0

My PC is running Windows 10 x64 which has a virtual machine that is a Windows 7 x86. This virtual machine has a SQL Server instance SQLEXPRESS. This server is provisional, in the future we are going to use another computer, this is for testing purposes.

I have developed a Windows desktop app which connects to this server to read and write.

Here is the connection string:

<add name="Importacion" 
     connectionString="Data Source=WIN-EIUKNBIVIED\SQLEXPRESS;Initial Catalog=Importacion;User Id=administrador;Password=contraseña" 
     providerName="System.Data.SqlClient" />

This has been developed in C# in Visual Studio. I have created an installer with all the dependencies. It works in the virtual machine.

Problem

When I install it on another computer, I get a SQL Server error #28.

Hints

  • Ping in virtual machine works to SQLEXPRESS
  • Ping from native PC to virtual machine works
  • Ping from native PC to SQLEXPRESS doesn't work

Things that I already tried

  • Enabling TCP/IP ports
  • Setting to connection to the server as mixed (Windows and SQL Server)
  • Disabling firewall on both computers
  • The new user that use the connection string have permission to do everything
  • The remote connection is enabled
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
raulmd13
  • 201
  • 2
  • 10

1 Answers1

0

I figured out.

When you create a DataConnection in Visual Studio 2019, the connection string is setup as Windows login. Even if you change it manually to add a SQL autentication, it doesn't use it as SQL login. If you want to use SQL login, you will have to make a new DataConnection.

I hope it helps someone in the future.

raulmd13
  • 201
  • 2
  • 10