Error : 'NT AUTHORITY\ANONYMOUS LOGON' ?
I'm trying to create a web form using ASP.NET , I'm simply trying to fill
a datagrid using data from SQL database.
When I run the project I get this error :
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Login failed for user
'NT AUTHORITY\ANONYMOUS LOGON'.
I don't know how to fix the problem, I tried to go to the security tab on
the aspx file properties and uncheck anonymous logon ,, but still I get the
Can anyone help me please ??
Thanks in Advance
Re: Error : 'NT AUTHORITY\ANONYMOUS LOGON' ?
> I'm simply trying to fill
>a datagrid using data from SQL database.
>When I run the project I get this error :
>Exception Details: System.Data.SqlClient.SqlException: Login failed for
>'NT AUTHORITY\ANONYMOUS LOGON'.
>I don't know how to fix the problem, I tried to go to the security tab on
>the aspx file properties and uncheck anonymous logon ,, but still I get
What is happening is that your data access code is using Windows Authentication
to connect to SQL Server; and the page is running as ANONYMOUS, as is typical
of ASP pages. The solutions depend on your requirements and environment,
of course, but here are the options:
1) If SQL Server is installed as Mixed Mode Security, ie Windows + SQL Server
security (or only SQL Server mode), then you could create a user login/account
to SQL Server for your app and explicitly connect using that user account.
2) If SQL Server is installed as Windows Authentication Mode only, then you
can either: add SQL SErver permissions for the NT anonymous user
(Not recommended) or add an NT user, assign SQL SErver rights to this NT
user, then set your web app to run as this user...
Hope this helps,
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL