Login failed for user ‘NT AUTHORITY\ANONYMOUS LOGON’

Login failed for user ‘NT AUTHORITY\ANONYMOUS LOGON’

If this error occurs when connecting a custom web part to the Sql database it usually means that the Anonymous Logon identity doesn’t have permissions to the specified database. To resolve this we can either change the identity to one that does, or give these account permissions; Or, use SQL Server authentication.

If Windows Authentication mode is selected during installation, the sa login is disabled. If you later change authentication mode to SQL Server and Windows Authentication mode, the sa login remains disabled. To enable the sa login, use the ALTER LOGIN statement.

ALTER LOGIN sa ENABLE ;
GO
ALTER LOGIN sa WITH PASSWORD = ‘<enterStrongPasswordHere>’ ;
GO

Now, the sa account can log in and access the databases in the custom web part.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s