K
Karl S.
I'm at a loss to what the solution is. I have an intranet application that
runs on w2k3 with iis 6.0 security set to Integrated Windows authentication
only. I am using C# in .NET 2003 (7.1.3088) w/ Framework 1.1 (1.1.4322 SP1).
The web.config authentication mode="Windows" and authorization set to <allow
users="*" />.
This app is trying to connect to SQL 7.0 on an NT server in the same domain.
I currently have a web service running on the same w2k3 web server that
accesses this same SQL Server but uses anonymous access (set to a domain
user) and it connects just fine. Here's a stripped down version of the
routine that throws the exception.
private DataTable getData()
{
SqlConnection conn = new SqlConnection ("server=ntServer;database=myDB;
Integrated
Security=SSPI");
conn.Open(); <--------- throws SqlException
....
}
When I use WindowsPrincipal.Identity.Name.ToString() to see who this .NET
app is being ran as, it comes back with the correct domain\username that has
proper access to the database (I even used the domain admin account). But
the SQL Error message is saying "Login failed for user'\'". I tried setting
the authentication mode to anonymous and use the same user and SqlConnection
as my web service but I get the same error message. I've got to be missing
something but what?
Please help.
runs on w2k3 with iis 6.0 security set to Integrated Windows authentication
only. I am using C# in .NET 2003 (7.1.3088) w/ Framework 1.1 (1.1.4322 SP1).
The web.config authentication mode="Windows" and authorization set to <allow
users="*" />.
This app is trying to connect to SQL 7.0 on an NT server in the same domain.
I currently have a web service running on the same w2k3 web server that
accesses this same SQL Server but uses anonymous access (set to a domain
user) and it connects just fine. Here's a stripped down version of the
routine that throws the exception.
private DataTable getData()
{
SqlConnection conn = new SqlConnection ("server=ntServer;database=myDB;
Integrated
Security=SSPI");
conn.Open(); <--------- throws SqlException
....
}
When I use WindowsPrincipal.Identity.Name.ToString() to see who this .NET
app is being ran as, it comes back with the correct domain\username that has
proper access to the database (I even used the domain admin account). But
the SQL Error message is saying "Login failed for user'\'". I tried setting
the authentication mode to anonymous and use the same user and SqlConnection
as my web service but I get the same error message. I've got to be missing
something but what?
Please help.