Link to home
Start Free TrialLog in
Avatar of jemigossaye
jemigossaye

asked on

Login failed for user '(null)'.

i have a linked server that i use in my stored procedures.
i keep getting this when i run the application should i add something to the connection string
Login failed for user '(null)'.

Avatar of dttri
dttri
Flag of Viet Nam image

Greetings,
Can you post your source code here? And can you login directly using SQL built-in tools?
Avatar of dstanley9
dstanley9

It sounds like delegation is not working.  I'm assuming you;ve got an ASP.NET app trying to access SQL on another server.

You can either use a SQL login in the connection string or get delegation working.  

Here are some articles to help implement delegation:

http://support.microsoft.com/default.aspx?scid=kb;en-us;810572
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsent7/html/vxconASPNETDelegation.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/PAGHT000023.asp
http://odetocode.com/Blogs/scott/archive/2005/02/24/1053.aspx

Avatar of jemigossaye

ASKER

hi,
 i tryed using <identity impersonate =" True"/> but no difference
and in my connection string i removed integrated security = sspi and it now have a different error
saying this
Access to the remote server is denied because no login-mapping exists
Sorry, didn't catch that you were using a linked server.  I don't know about login mapping, but delegation requires more than just turing on impersonation. It allows the first SQL setver to access the second SQL server using the original credentials (the password is not sent, only the user ID and a "ticket" authenticating the user).

Delegation requires some setup in Active Directory as well. In addition, the two SQL servers must be communicating via TCP/IP, not Named Pipes.  THis can be checked by running a Trace on the linked server and accessing it from the first server.
hi,

well what i don't understand is that when i run the stored procedure form the query analyzer it gives the same error saying Login failed for user '(null)'
ASKER CERTIFIED SOLUTION
Avatar of dstanley9
dstanley9

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial