Friday, February 24, 2012

Connection confusion

When I try to run my application on our server I cannot connect to the SQL Server that's on the same machine (a named instance). I get the SqlException:Login failed for ("null") user. Not a trusted SQL Server connection. I CAN however, connect to this database from the IDE on my laptop--the app works just fine.

I have reconfigured the IIS, the default site and the directory for the app: I turned off anonymous access, turned it on, changed users, changed passwords, etc. I have done the same for the database, added users, changed permissions, added permissions, etc., you get the picture...none of it worked. (I changed the connection string to those users/pwds)

I saw on an MS site that this error can occur under heavy loads...but that's not the case here.

Please help! Thanks!!

You have what is called orphan user, it happened to me recently I had to delete some files in the master but there are other solutions. You may have moved the database from another server or recreated it, the login you are trying to use only exist in the Master but is not available. Try the links below for solutions. If you are still having the problem, I would restore from backup using the device option in the backup wizard. Hope this helps.

http://vyaskn.tripod.com/troubleshooting_orphan_users.htm
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=12615

|||

Sorry to be so long responding, got pulled to another issue...

I'm not sure that an orphan user isn't the problem, but I ran sp_helplogins and the results show user ASPNET mapped toservername/ASPNET.I think that means that ASPNET is recognized as a validated user. This would explain why I can connect from my laptop IDE (Visual Studio.NET) with no problems, wouldn't it?

Is there something within the .NET framework installed on the server that needs to be changed or upgraded?

Thanks again for your help!

No comments:

Post a Comment