Reliable SQL Server Connectivity

When I try to connect to my console application with my sqlExpress. I get the following error:

The user is not associated with a reliable SQL Server connection.

I have:

  1. Switched Users
  1. Password Switched
  1. Dial-up servers
  1. Switched Databases

I always get the same error. I am using VS 2010 and Sql Server 2005

Here is my current connection string

SqlDatabase sqlDatabase = new SqlDatabase(@"Server=localmachineName\SQLEXPRESS;   database=database1;user id=username; password=mypassword;");
+3
source share
3 answers

Is sql authorization allowed?

Check this out if you haven't done it yet: http://www.hosting.com/support/vps/windows/mixedmode/

+3
source

; username password.

+2

As indicated, your connection string does not look right. Examples can be found at connectionstrings.com . Alternatively, this KB article may provide some help.

0
source

Source: https://habr.com/ru/post/1746043/


All Articles