Solved

Login failed for user '(null)'.

Posted on 2006-06-21
6
312 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
C# TextBox 11 30
Does this SQL code look like it will work using VS2010 with .NetFramework 4.0 ? 2 42
C# application error "Parameter Is Not Valid". 3 79
Entity Framework 7 28
Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Delivering innovative fully-managed cloud services for mission-critical applications requires expertise in multiple areas plus vision and commitment. Meet a few of the people behind the quality services of Concerto.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

919 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

23 Experts available now in Live!

Get 1:1 Help Now