SQL Connection String using Domain Account




Folks,

I am working on a .Net web site that connects to SQL Server 2000 on another
box. The DBA has given me a Domain user account with rights to the database
and table. I have confirmed with Query Analyzer that the user ID and
password are good and can access the correct tables. However, I am unable
to get a connection to the database. I either get a Login Failed for (NULL)
user. or Not a Trusted Connection, or Login failed for userID. I have a
felling that I am just using the wrong connection string but each one that I
have tried still fails. The end user must login to the site and it set up
as integrated, but I am not able to use the users ID since they do not have
access to the database.


Here is what I have tried so far.

SqlConnection sqlCON = new SqlConnection(@"Password=Password;User
ID=Domain\userID;Data Source=ServerName\ServerInstance;Initial
Catalog=DatabaseName;");

And

SqlConnection sqlCON = new
SqlConnection(@"Server=ServerName\ServerInstance;Database=DabaseName;UID=Domain\UserID;PWD=Password");

I have tried it with and without the domain name. Most of the time I just
get the standard "Login Failed for Domain\UserID" so it appears to be
getting to the server and rejected. I have a feeling that it is treating it
as a standard SQL account and not a domain account.

Anyone know what I am doing wrong?


Tim


.



Relevant Pages

  • Security context issue (weird behavior)
    ... The SQL Server is setup to use mix mode authentication. ... The users have a domain account. ... To log in to the SQL server I use an ADO connection. ... I tried to view the pages from another machine with the anonymous access ...
    (microsoft.public.data.ado)
  • Re: SQL Connection String using Domain Account
    ... Web.Config but now have the problem that the web site will not run under ... you can have a username/password set up in sql server - but this would ... The DBA has given me a Domain user account with rights to ... I am unable to get a connection to the database. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Passthrough authenication w/ SQL trusted connection
    ... separate connection will be used for each security context (each user ... account will have it's own pool). ... if you are using a Windows 2000 Domain, ... backend SQL Server. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Login failed for user (null)
    ... SSPI security assumes that the user credentials are known to the SQL Server. ... Setup a login account matching your credentials and give the account rights ... > When I created my connection in the Data Adapter Configuration wizard, ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: SQL Server on XP Home Network
    ... There is an "sa" account under the Security>Logins area. ... Does that coorelate to a SQL Server login? ... I tried setting up the connection to use that SQL Server ...
    (microsoft.public.sqlserver.setup)