Solved

Login failed for user '(null)'.

Posted on 2006-06-21
6
311 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now