Solved

Login failed for user '(null)'.

Posted on 2006-06-21
6
315 Views
Last Modified: 2010-04-16
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)'.

0
Comment
Question by:jemigossaye
  • 3
  • 2
6 Comments
 
LVL 7

Expert Comment

by:dttri
ID: 16952879
Greetings,
Can you post your source code here? And can you login directly using SQL built-in tools?
0
 
LVL 25

Expert Comment

by:dstanley9
ID: 16952903
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

0
 

Author Comment

by:jemigossaye
ID: 16953514
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
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 25

Expert Comment

by:dstanley9
ID: 16953602
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.
0
 

Author Comment

by:jemigossaye
ID: 16953767
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)'
0
 
LVL 25

Accepted Solution

by:
dstanley9 earned 250 total points
ID: 16953822
Are you running query analyzer from another machine?  Delegation is stil lthe issue in that case as well.  The credentials (username/password) used to access the first server cannot be used to access resources on other servers (i.e. the linked server) without delegation.
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question