Cannot open database requested in login 'HumanResources'. Login failed for user 'companyDomain\BOSII

Discussion in 'ASP .Net' started by Homer, Sep 22, 2007.

  1. Homer

    Homer Guest

    Hi,

    I have an ASP.NET 2.0 Intranet app that works fine on a test server
    running on Win2003 Server with IIS 6.0. However, it fails when I port
    it over to the production server running on the same OS. I compared
    all the configurations and everything matches. I then re-run the
    aspnet_regiis; I even granted "NT AUTHORITY\NETWORK SERVICE" full
    access to aspnet_Membership and aspnet_Roles. I don't know why the
    app uses a local user account instead of the "NT AUTHORITY\NETWORK
    SERVICE" account. Please help me.

    Thanks,
    Jonathan Kha
    Homer, Sep 22, 2007
    #1
    1. Advertising

  2. On Sep 22, 1:47 am, Homer <> wrote:
    > Hi,
    >
    > I have an ASP.NET 2.0 Intranet app that works fine on a test server
    > running on Win2003 Server with IIS 6.0. However, it fails when I port
    > it over to the production server running on the same OS. I compared
    > all the configurations and everything matches. I then re-run the
    > aspnet_regiis; I even granted "NT AUTHORITY\NETWORK SERVICE" full
    > access to aspnet_Membership and aspnet_Roles. I don't know why the
    > app uses a local user account instead of the "NT AUTHORITY\NETWORK
    > SERVICE" account. Please help me.
    >


    Hi Jonathan

    the problem is in the database and not in the ASP.NET. Go to the
    database and check if windows authentication is allowed and the aspnet
    account is in the user list. You can also create a new database
    account and use it to open database from ASP.NET application.

    Hope this helps
    Alexey Smirnov, Sep 23, 2007
    #2
    1. Advertising

  3. Homer

    Homer Guest

    On Sep 23, 8:29 am, Alexey Smirnov <> wrote:
    > On Sep 22, 1:47 am, Homer <> wrote:
    >
    > > Hi,

    >
    > > I have an ASP.NET 2.0 Intranet app that works fine on a test server
    > > running on Win2003 Server with IIS 6.0. However, it fails when I port
    > > it over to the production server running on the same OS. I compared
    > > all the configurations and everything matches. I then re-run the
    > > aspnet_regiis; I even granted "NT AUTHORITY\NETWORK SERVICE" full
    > > access to aspnet_Membership and aspnet_Roles. I don't know why the
    > > app uses a local user account instead of the "NT AUTHORITY\NETWORK
    > > SERVICE" account. Please help me.

    >
    > Hi Jonathan
    >
    > the problem is in the database and not in the ASP.NET. Go to the
    > database and check if windows authentication is allowed and the aspnet
    > account is in the user list. You can also create a new database
    > account and use it to open database from ASP.NET application.
    >
    > Hope this helps


    Hi,

    My app is an asp.net 2.0 app with no impersonation. By default, I
    expect Network Service be used. The database uses Windows
    Authentication. I added the "NT AUTHORITY\NETWORK SERVICE account to
    the database. I checked the security setting on the app folder at C:
    \Inetpub\wwwroot\HumanResources and verified that NETWORK SERVICE is
    added to the folder. Am I missing anything here?

    Thanks,
    Jonathan Kha
    Homer, Sep 24, 2007
    #3
  4. On Sep 24, 10:58 pm, Homer <> wrote:
    > On Sep 23, 8:29 am, Alexey Smirnov <> wrote:
    >
    >
    >
    >
    >
    > > On Sep 22, 1:47 am, Homer <> wrote:

    >
    > > > Hi,

    >
    > > > I have an ASP.NET 2.0 Intranet app that works fine on a test server
    > > > running on Win2003 Server with IIS 6.0. However, it fails when I port
    > > > it over to the production server running on the same OS. I compared
    > > > all the configurations and everything matches. I then re-run the
    > > > aspnet_regiis; I even granted "NT AUTHORITY\NETWORK SERVICE" full
    > > > access to aspnet_Membership and aspnet_Roles. I don't know why the
    > > > app uses a local user account instead of the "NT AUTHORITY\NETWORK
    > > > SERVICE" account. Please help me.

    >
    > > Hi Jonathan

    >
    > > the problem is in the database and not in the ASP.NET. Go to the
    > > database and check if windows authentication is allowed and the aspnet
    > > account is in the user list. You can also create a new database
    > > account and use it to open database from ASP.NET application.

    >
    > > Hope this helps

    >
    > Hi,
    >
    > My app is an asp.net 2.0 app with no impersonation. By default, I
    > expect Network Service be used. The database uses Windows
    > Authentication. I added the "NT AUTHORITY\NETWORK SERVICE account to
    > the database. I checked the security setting on the app folder at C:
    > \Inetpub\wwwroot\HumanResources and verified that NETWORK SERVICE is
    > added to the folder. Am I missing anything here?
    >
    > Thanks,
    > Jonathan Kha- Hide quoted text -
    >
    > - Show quoted text -


    Hi Jonathan

    try to add into your pages

    User: <%=User.Identity.Name%>

    to see what user is running your application. It looks like in the
    second case you would have the companyDomain\BOSIIS$

    Check what authentication mode you have and also check the Security
    tab on IIS to see if there any difference.

    Hope it helps
    Alexey Smirnov, Sep 25, 2007
    #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. Nans
    Replies:
    2
    Views:
    20,070
    Martin Marinov
    Jun 17, 2004
  2. Mr.KisS
    Replies:
    0
    Views:
    526
    Mr.KisS
    Jul 6, 2004
  3. Tony Johansson
    Replies:
    3
    Views:
    16,109
    Patrice
    Jan 2, 2010
  4. Max
    Replies:
    0
    Views:
    381
  5. Jess
    Replies:
    1
    Views:
    208
Loading...

Share This Page