Interview Question in Service Packs and Patches


 

Interview Question :: ASP.NET amp; SQLServer Problem Login failed for user ;(null)


hi
am trying to run a page in asp.net(C#) which is connected to a database located on a server(LAN), it was running normaly, but when i installed sqlserver service pack 3 on the server, i got this error:
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
i tryed to uninstall the sp3, Or install sp4, i checked all the securitys, every thing is okay but still not working, can any body help me plzzzzzzzzzzzz
Answers to "ASP.NET amp; SQLServer Problem Login failed for user ;(null) "
RE: ASP.NET amp; SQLServer Problem Login failed for user ;(null) ?

It's an authentication problem and not a service pack issue. To solve this problem you should understand how SQL server authenticates users.



SQL Server can authenticate users in one of 2 modes:

1- Windows Authentication Mode : allows a user to connect through a Microsoft Windows user account

2- Mixed Mode: allows users to connect to an instance of SQL Server using either Windows Authentication or SQL Server Authentication. Users who connect through a Windows NT 4.0 or Windows 2000 user account can make use of trusted connections in either Windows Authentication Mode or Mixed Mode.



You should set your Server to authenticate users in the appropriate method.



To enable SQL Server to authenticate users in Mixed Mode, go to enterprise manager >> Right Click your server >> Properties >> Choose the Security Tab >> Click on SQL Server & Windows under Security / Authentication



Hope this helps.
 
Vote for this answer ::  
Update Alert Setting