G
Guest
I need to ask this question again because I am simply not getting it...
Can somebody please tell us what we need to do and explain the solution?
Please see the problem below.
Situation:
Using XP Pro development machine (VS 2003) trying to connect to a W2k3
server running SQL Server 2000 with ASP.NET (C#) using SqlClient.
SqlConnection objConn = new SqlConnection("Trusted_Connection=no;User
ID=sa;Password=MySaPassword;Initial Catalog=MyDatabaseData
Source=MyRemoteServer");
objConn.Open(); //.Open() generates an error.
Error: "SQL Server does not exist or access denied."
We are positive the connection string (creds, server, and database) are
correct because they work from a windows form application written in C#
(using exact same connection code). The firewall is not installed on the
server. Port 2433 is listening. We do know a work-around using
impersonation, but we are looking for an explanation. The W2k3 server is a
member of a domain (if that matters). The connection works when accessing a
W2k server just fine (of course changing only the server name in the
connection string).
One interesting thing is that the Event Viewer on the w2k3 server shows
failed login attempts for ASPNET. But, we are not accessing the database
using windows credentials, we are passing the credentials for SA. So, why is
ASPNET on my box trying to authenticate to the server? Shouldn't only the
credentials for SA be compared against SQL Servers internal security
mechanisms and leave the whole Windows security/authentication out of the
loop entirely.
Can somebody please tell us what we need to do and explain the solution?
Please see the problem below.
Situation:
Using XP Pro development machine (VS 2003) trying to connect to a W2k3
server running SQL Server 2000 with ASP.NET (C#) using SqlClient.
SqlConnection objConn = new SqlConnection("Trusted_Connection=no;User
ID=sa;Password=MySaPassword;Initial Catalog=MyDatabaseData
Source=MyRemoteServer");
objConn.Open(); //.Open() generates an error.
Error: "SQL Server does not exist or access denied."
We are positive the connection string (creds, server, and database) are
correct because they work from a windows form application written in C#
(using exact same connection code). The firewall is not installed on the
server. Port 2433 is listening. We do know a work-around using
impersonation, but we are looking for an explanation. The W2k3 server is a
member of a domain (if that matters). The connection works when accessing a
W2k server just fine (of course changing only the server name in the
connection string).
One interesting thing is that the Event Viewer on the w2k3 server shows
failed login attempts for ASPNET. But, we are not accessing the database
using windows credentials, we are passing the credentials for SA. So, why is
ASPNET on my box trying to authenticate to the server? Shouldn't only the
credentials for SA be compared against SQL Servers internal security
mechanisms and leave the whole Windows security/authentication out of the
loop entirely.