website connection to database time out problem : login failed for user 'NT AUTHORITY\ANONYMOUS LOGO

Discussion in 'ASP .Net' started by Maellic, Jan 12, 2004.

  1. Maellic

    Maellic Guest

    Hi,

    The website I am working on is built with ASP.NET and connects to a
    SQL Server 2000 database. The web server and database are on the same
    machine. I have recently tried to modify the timeout of the website
    from 20 mn to 60 mn. I changed the timeout setting in IIS. Now the
    website itself doesn't time out, however after 20 mn, when I try to
    access a page that needs to connect to the database, I get the
    following error message

    ******************************************************************************************
    Form Request:
    ASP Code:
    Error Number: -2147217843
    ASP Source:
    Error Category: Microsoft OLE DB Provider for SQL Server
    File: /emissionsestimation/includes/db.asp
    Line: 13
    Description: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
    ASP Description:
    Date: 1/13/2004 9:26:08 AM
    ********************************************************************************************

    If I access a page that doesn't connect to the database, it works
    fine.

    My connection string to the database is:
    "PROVIDER=SQLOLEDB;Data Source=*IP_ADRESS*;User
    Id=*USER_ID*;Password=*PASSWORD*;Initial
    Catalog=EmissionEstimations;Trusted_Connection=yes;"

    The connection to the database works fine unless the website is idle
    for 20 mn. After 60 mn, I get the time out message I expected. So the
    "login failed for user" message only happens if the application is
    left idle between 20 mn and 60 mn.

    Maybe the database has some kind of timeout setting that needs to be
    modified as well? However why the "login failed" message ? Why this
    user "ANONYMOUS" ? I'm kinda confused and I'd appreciate some help
    onto why this happens and what to do about it.

    Thanks heaps

    Maelle
    Maellic, Jan 12, 2004
    #1
    1. Advertising

  2. Maellic

    Hermit Dave Guest

    you are using trusted connection and are also specifying the user name
    password... that is why when the db connection fails you get
    Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

    first remove the trusted connection... that should make that error go off...
    as to why it happens after 20 mins... i am not sure...

    your connection should look like this

    "PROVIDER=SQLOLEDB;Data Source=*IP_ADRESS*;User
    Id=*USER_ID*;Password=*PASSWORD*;Initial
    Catalog=EmissionEstimations;"

    or

    "PROVIDER=SQLOLEDB;Data Source=*IP_ADRESS*;User
    Initial Catalog=EmissionEstimations;Trusted_Connection=yes;"

    Second thing.. if you are using ASP.NET and are using Sql 2000 consider
    using SqlClient namespace instead of OleDb
    sqlclient is more efficient way ...

    --
    Regards,

    HD

    "Maellic" <> wrote in message
    news:...
    > Hi,
    >
    > The website I am working on is built with ASP.NET and connects to a
    > SQL Server 2000 database. The web server and database are on the same
    > machine. I have recently tried to modify the timeout of the website
    > from 20 mn to 60 mn. I changed the timeout setting in IIS. Now the
    > website itself doesn't time out, however after 20 mn, when I try to
    > access a page that needs to connect to the database, I get the
    > following error message
    >
    >

    ****************************************************************************
    **************
    > Form Request:
    > ASP Code:
    > Error Number: -2147217843
    > ASP Source:
    > Error Category: Microsoft OLE DB Provider for SQL Server
    > File: /emissionsestimation/includes/db.asp
    > Line: 13
    > Description: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
    > ASP Description:
    > Date: 1/13/2004 9:26:08 AM
    >

    ****************************************************************************
    ****************
    >
    > If I access a page that doesn't connect to the database, it works
    > fine.
    >
    > My connection string to the database is:
    > "PROVIDER=SQLOLEDB;Data Source=*IP_ADRESS*;User
    > Id=*USER_ID*;Password=*PASSWORD*;Initial
    > Catalog=EmissionEstimations;Trusted_Connection=yes;"
    >
    > The connection to the database works fine unless the website is idle
    > for 20 mn. After 60 mn, I get the time out message I expected. So the
    > "login failed for user" message only happens if the application is
    > left idle between 20 mn and 60 mn.
    >
    > Maybe the database has some kind of timeout setting that needs to be
    > modified as well? However why the "login failed" message ? Why this
    > user "ANONYMOUS" ? I'm kinda confused and I'd appreciate some help
    > onto why this happens and what to do about it.
    >
    > Thanks heaps
    >
    > Maelle
    Hermit Dave, Jan 13, 2004
    #2
    1. Advertising

  3. Maellic

    Hermit Dave Guest

    sorry the second connection string using trusted connection should look
    something like this

    "PROVIDER=SQLOLEDB;Data Source=*IP_ADRESS*; Initial
    Catalog=EmissionEstimations;Trusted_Connection=yes;"


    --
    Regards,

    HD

    "Hermit Dave" <> wrote in message
    news:%23y$...
    > you are using trusted connection and are also specifying the user name
    > password... that is why when the db connection fails you get
    > Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
    >
    > first remove the trusted connection... that should make that error go

    off...
    > as to why it happens after 20 mins... i am not sure...
    >
    > your connection should look like this
    >
    > "PROVIDER=SQLOLEDB;Data Source=*IP_ADRESS*;User
    > Id=*USER_ID*;Password=*PASSWORD*;Initial
    > Catalog=EmissionEstimations;"
    >
    > or
    >
    > "PROVIDER=SQLOLEDB;Data Source=*IP_ADRESS*;User
    > Initial Catalog=EmissionEstimations;Trusted_Connection=yes;"
    >
    > Second thing.. if you are using ASP.NET and are using Sql 2000 consider
    > using SqlClient namespace instead of OleDb
    > sqlclient is more efficient way ...
    >
    > --
    > Regards,
    >
    > HD
    >
    > "Maellic" <> wrote in message
    > news:...
    > > Hi,
    > >
    > > The website I am working on is built with ASP.NET and connects to a
    > > SQL Server 2000 database. The web server and database are on the same
    > > machine. I have recently tried to modify the timeout of the website
    > > from 20 mn to 60 mn. I changed the timeout setting in IIS. Now the
    > > website itself doesn't time out, however after 20 mn, when I try to
    > > access a page that needs to connect to the database, I get the
    > > following error message
    > >
    > >

    >

    ****************************************************************************
    > **************
    > > Form Request:
    > > ASP Code:
    > > Error Number: -2147217843
    > > ASP Source:
    > > Error Category: Microsoft OLE DB Provider for SQL Server
    > > File: /emissionsestimation/includes/db.asp
    > > Line: 13
    > > Description: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
    > > ASP Description:
    > > Date: 1/13/2004 9:26:08 AM
    > >

    >

    ****************************************************************************
    > ****************
    > >
    > > If I access a page that doesn't connect to the database, it works
    > > fine.
    > >
    > > My connection string to the database is:
    > > "PROVIDER=SQLOLEDB;Data Source=*IP_ADRESS*;User
    > > Id=*USER_ID*;Password=*PASSWORD*;Initial
    > > Catalog=EmissionEstimations;Trusted_Connection=yes;"
    > >
    > > The connection to the database works fine unless the website is idle
    > > for 20 mn. After 60 mn, I get the time out message I expected. So the
    > > "login failed for user" message only happens if the application is
    > > left idle between 20 mn and 60 mn.
    > >
    > > Maybe the database has some kind of timeout setting that needs to be
    > > modified as well? However why the "login failed" message ? Why this
    > > user "ANONYMOUS" ? I'm kinda confused and I'd appreciate some help
    > > onto why this happens and what to do about it.
    > >
    > > Thanks heaps
    > >
    > > Maelle

    >
    >
    Hermit Dave, Jan 13, 2004
    #3
  4. Maellic

    Maellic Guest

    "Hermit Dave" <> wrote in message news:<>...
    > sorry the second connection string using trusted connection should look
    > something like this
    >
    > "PROVIDER=SQLOLEDB;Data Source=*IP_ADRESS*; Initial
    > Catalog=EmissionEstimations;Trusted_Connection=yes;"
    >
    >



    Thanks a lot, I'll try that and see... Hopefully it'll fix my problem
    although the timeout thing is weird.


    > > Second thing.. if you are using ASP.NET and are using Sql 2000 consider
    > > using SqlClient namespace instead of OleDb
    > > sqlclient is more efficient way ...


    I'll look into it. If you know of any good websites that explain the
    difference between both, I'd appreciate your pointers, otherwise I'll
    just google it.

    Thanks for your help

    Maelle
    Maellic, Jan 13, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?QnVnZ3ltYW4=?=

    Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON

    =?Utf-8?B?QnVnZ3ltYW4=?=, Jun 24, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    47,577
    sangsharma
    Dec 31, 2007
  2. Sorcerdon
    Replies:
    2
    Views:
    3,102
    Norman Yuan
    Jul 5, 2006
  3. Srinivas Chintakindi

    Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'

    Srinivas Chintakindi, Nov 10, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    1,485
    Jay Pondy
    Nov 30, 2006
  4. Jay Pondy
    Replies:
    0
    Views:
    705
    Jay Pondy
    Nov 30, 2006
  5. YMichurin
    Replies:
    0
    Views:
    502
    YMichurin
    Oct 18, 2007
Loading...

Share This Page