Error Message "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection"

Posted on 2006-05-11
Last Modified: 2008-01-09
I deployed an 2.0 app in March that was running properly until a few days ago.  I didn't have time to examine it much, I was simply told to move it to a new server and that it was no longer working.

Since the move, I've encountered several problems.  The app is accessible and runs locally by referencing both the localhost and the server name.  However, an attempt to access it accross the network results in either one or two error messages depending on how I had the web app configured:

                       "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection."
                        [this occurs when I have the app set for Integrated Windows authentication only]

                       "You are not authorized to view this page.
                        HTTP Error 401.1 - Unauthorized: Access is denied due to invalid credentials.
                        Internet Information Services (IIS)"
                        [this occurs when the app is set to allow Anonymous Access]

No matter what domain user account I use for anonymous access in the Window Event View I always get a logon failure for the NT AUTHORITY\SYSTEM account using the designated domain user account for anonymous access.  The domain user accounts are added as SQL logins with access to the applicable database.

Anyone have any ideas what's going on with this?  The new server is using Sharepoint, application pools, IIS 6 on a Win 2003 box.  SQL Server 2000 is on a separate box.


Question by:FoxProMari
    LVL 1

    Accepted Solution

    Perhaps this link will help:
    LVL 26

    Assisted Solution

    by:Leon Fester
    Are you missing any DSN entries?
    LVL 7

    Assisted Solution

    by:Anandhi K
    Just add this in your connection string and try again


    Author Comment

    db 1110, I can't put the credentials in the connection string for security reasons.  I checked the link posted by aim4fame and there isn't a missing DSN entry.  It appears to be a configuration issue involving the application pool(s) in Sharepoint/IIS.

    I think I'll post a link to this question on the IIS board.  Thanks for your suggestions anyway.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Introduction Many web sites contain image galleries; a common design for these galleries includes a page with a collection of thumbnail images.  You can click on each of the thumbnail images to see the larger version of the image.  This is easily i…
    Accessibility and Usability are two concepts that seem to be closely related.  But, too many people seem to have a distorted perception of them. During last five years, those two words have come to the day-to-day work of almost every web develope…
    Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
    This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

    729 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

    17 Experts available now in Live!

    Get 1:1 Help Now