Tuesday, March 27, 2012

A Different Login failed for user sa problem

Hello,

I know there are already topics on the "Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection" problem but I think this one might be different.

I am working with 2 servers, both running Windows Server 2003 with 1 running SQL Server 2000 and the other acting as a Web Server, and a PC running Windows XP Pro as a development machine - all of which are on the same domain.

I am developing a couple of ASP.NET web applications, and this is where the problem occurs. If I try to connect to the SQL database with the web application running on the development PC I get the "Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection" error message.

This is where it gets interesting. If I take a copy of the code that is running on the development PC and run it on the Web Server, it is able to connect to the SQL database without any problems.

The Authentication mode is set to SQL Server and Windows. I have tried several different things with our Techs and we get the same problem.

Any ideas or suggestions would be greatly appreciated as we are totally stumped.

Thanks,
AlHowdy

Never, ever, ever, ever has NT authentication on SQL been bullet proof...then mix that with multiple versions of VB & SQL & W2K & W2K3 and....aw man...game over.....

Worth trying using plain SQL authentication ( if thats acceptible in your environment ) and see how that goes - at least it will get your app working initially. Then work on the NT authentication bit.

You may wind up having to wait for the next SP for everything if its a bug.

Cheers,

SG.|||All I am using at the moment is SQL authentication and I have absolutely no interest in using NT or Windows Authentication.

Thanks anyway,
Al|||Howdy,

Sounds like connection thinks it is using a trusted connection...can you force it to be sure its using straight SQL authentication? I have seen similar errors with sql configured apps trying to use ODBC connections configured fro NT authentication.

HTH

Cheers,

SG|||Go to the enterprise manager, right click on the server, in the properties, select security tab and select the first option(SQL Server and Windows NT) in the Authentication.

Now try connecting from your application.

No comments:

Post a Comment