Error : 'NT AUTHORITY\ANONYMOUS LOGON' ?


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Error : 'NT AUTHORITY\ANONYMOUS LOGON' ?

  1. #1
    Abeer Bader Guest

    Error : 'NT AUTHORITY\ANONYMOUS LOGON' ?


    Hi

    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'.

    Source Error:
    SqlDataAdapter1.Fill(DataSet11, "employee_data")


    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
    same error.


    Can anyone help me please ??


    Thanks in Advance


    Abeer Bader


  2. #2
    Paul Mc Guest

    Re: Error : 'NT AUTHORITY\ANONYMOUS LOGON' ?


    G'day.

    > 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

    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
    >same error.


    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,
    Cheers,
    Paul


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center