C
Coder Mouse
Here is the scenario...
- There are two sql servers: "Production" and "Staging".
PLEASE READ THIS BEFORE REPLYING --> Both SQL servers are set to "SQL
Server and Windows" mixed authentication mode. (I
have verified this multiple times). Both Sql Servers have Named pipes and
TCP/IP port 1433 installed under network client configuration
- There is a development machine: "Development".
Any machine we try to connect from using the following has the same
behavior however.
Problem: Cannot connect from ASP.NET app running on "Development" under the
IUSER account to the "Staging" server using SQL
Server authentication. Here is the connection string...
"Server=Staging; Database=V2Staging; User=sa; Password=development"
It throws the exception:
System.Data.SqlClient.SqlException: SQL Server does not exist or access
denied. at
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction)
at
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnec
tionString options, Boolean& isInTransaction) at
System.Data.SqlClient.SqlConnection.Open() at
SqlSecurityTest.WebForm1.Connect(String connectionString) in
c:\inetpub\wwwroot\sqlsecuritytest\default.aspx.cs:line 57 at
SqlSecurityTest.WebForm1.Page_Load(Object sender, EventArgs e)
in c:\inetpub\wwwroot\sqlsecuritytest\default.aspx.cs:line 36
Oddity 1: We CAN establish a connection from the same ASP.NET app on
"Development" running under the IUSER account to the
"Production" using SQL Server authentication.. Here is that connection
string...
"Server=Production; Database=V2Production; User=sa; Password=production"
Oddity 2: We CAN establish connections from the ASP.NET app on
"Development" running under the NT AUTHORITY\NETWORK SERVICE
account to BOTH servers using SQL Server authentication..
I have boiled this down to this question...
Why should the windows account the application is running under imapct
connectivity to a SQL Server at all when using SQL
Server authentication and both sql servers are running in mixed
authentication mode?
This has been a thorn in my side for many days. I want to solve this
problem and will set up a web page with screen shots or
collect any information you might find useful to help me solve this problem.
Thank you for your help,
-Thomas Kadlec
(e-mail address removed)
- There are two sql servers: "Production" and "Staging".
PLEASE READ THIS BEFORE REPLYING --> Both SQL servers are set to "SQL
Server and Windows" mixed authentication mode. (I
have verified this multiple times). Both Sql Servers have Named pipes and
TCP/IP port 1433 installed under network client configuration
- There is a development machine: "Development".
Any machine we try to connect from using the following has the same
behavior however.
Problem: Cannot connect from ASP.NET app running on "Development" under the
IUSER account to the "Staging" server using SQL
Server authentication. Here is the connection string...
"Server=Staging; Database=V2Staging; User=sa; Password=development"
It throws the exception:
System.Data.SqlClient.SqlException: SQL Server does not exist or access
denied. at
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction)
at
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnec
tionString options, Boolean& isInTransaction) at
System.Data.SqlClient.SqlConnection.Open() at
SqlSecurityTest.WebForm1.Connect(String connectionString) in
c:\inetpub\wwwroot\sqlsecuritytest\default.aspx.cs:line 57 at
SqlSecurityTest.WebForm1.Page_Load(Object sender, EventArgs e)
in c:\inetpub\wwwroot\sqlsecuritytest\default.aspx.cs:line 36
Oddity 1: We CAN establish a connection from the same ASP.NET app on
"Development" running under the IUSER account to the
"Production" using SQL Server authentication.. Here is that connection
string...
"Server=Production; Database=V2Production; User=sa; Password=production"
Oddity 2: We CAN establish connections from the ASP.NET app on
"Development" running under the NT AUTHORITY\NETWORK SERVICE
account to BOTH servers using SQL Server authentication..
I have boiled this down to this question...
Why should the windows account the application is running under imapct
connectivity to a SQL Server at all when using SQL
Server authentication and both sql servers are running in mixed
authentication mode?
This has been a thorn in my side for many days. I want to solve this
problem and will set up a web page with screen shots or
collect any information you might find useful to help me solve this problem.
Thank you for your help,
-Thomas Kadlec
(e-mail address removed)