Cannot open database requested in login 'xyz'. Login fails.

Discussion in 'ASP .Net' started by Nans, Jun 17, 2004.

  1. Nans

    Nans Guest

    One basic ASP.NET database issue….
    I have a c# app running on a iis6 on one win2k3 adv servermachine &
    database on other win2k server machine…(in the same domain)

    Using windows authentication in web.config. Set impersonate =true .
    Connection string has Integrated security=SSPI. Logging in with my ID
    which is system administrator and has rights all DBs on the sql
    machine.

    But still, I get this error..(even I tried putting for test purpose
    the username & pw in identity tag, but still same error.)
    (My app is working fine with db & iis on same machine)


    Exception Type: System.Data.SqlClient.SqlException
    Errors: System.Data.SqlClient.SqlErrorCollection
    Class: 11
    LineNumber: 0
    Message: Cannot open database requested in login 'xyz'. Login fails.
    Login failed for user 'XYZDomian\v-xyz'.
    Number: 4060

    I tried the option of using Ntwork share in a custom application pool
    & giving the access rights to the network share on the sql machine.
    But this too didnt work..

    Any help on this is appreciated..

    Thanks,
    Nandi
    Nans, Jun 17, 2004
    #1
    1. Advertising

  2. Nans

    avnrao Guest

    set impersonate = false.
    and give the default aspnet account (or the identity in which application
    pool is running) database access.

    Av.
    "Nans" <> wrote in message
    news:...
    > One basic ASP.NET database issue..
    > I have a c# app running on a iis6 on one win2k3 adv servermachine &
    > database on other win2k server machine.(in the same domain)
    >
    > Using windows authentication in web.config. Set impersonate =true .
    > Connection string has Integrated security=SSPI. Logging in with my ID
    > which is system administrator and has rights all DBs on the sql
    > machine.
    >
    > But still, I get this error..(even I tried putting for test purpose
    > the username & pw in identity tag, but still same error.)
    > (My app is working fine with db & iis on same machine)
    >
    >
    > Exception Type: System.Data.SqlClient.SqlException
    > Errors: System.Data.SqlClient.SqlErrorCollection
    > Class: 11
    > LineNumber: 0
    > Message: Cannot open database requested in login 'xyz'. Login fails.
    > Login failed for user 'XYZDomian\v-xyz'.
    > Number: 4060
    >
    > I tried the option of using Ntwork share in a custom application pool
    > & giving the access rights to the network share on the sql machine.
    > But this too didnt work..
    >
    > Any help on this is appreciated..
    >
    > Thanks,
    > Nandi
    avnrao, Jun 17, 2004
    #2
    1. Advertising

  3. You have to allow windows authentication on the and add the aspnet account
    in the database

    Regards
    Martin


    "Nans" <> wrote in message
    news:...
    > One basic ASP.NET database issue..
    > I have a c# app running on a iis6 on one win2k3 adv servermachine &
    > database on other win2k server machine.(in the same domain)
    >
    > Using windows authentication in web.config. Set impersonate =true .
    > Connection string has Integrated security=SSPI. Logging in with my ID
    > which is system administrator and has rights all DBs on the sql
    > machine.
    >
    > But still, I get this error..(even I tried putting for test purpose
    > the username & pw in identity tag, but still same error.)
    > (My app is working fine with db & iis on same machine)
    >
    >
    > Exception Type: System.Data.SqlClient.SqlException
    > Errors: System.Data.SqlClient.SqlErrorCollection
    > Class: 11
    > LineNumber: 0
    > Message: Cannot open database requested in login 'xyz'. Login fails.
    > Login failed for user 'XYZDomian\v-xyz'.
    > Number: 4060
    >
    > I tried the option of using Ntwork share in a custom application pool
    > & giving the access rights to the network share on the sql machine.
    > But this too didnt work..
    >
    > Any help on this is appreciated..
    >
    > Thanks,
    > Nandi
    Martin Marinov, Jun 17, 2004
    #3
    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. Christof Krueger
    Replies:
    1
    Views:
    590
    Christof Krueger
    Dec 19, 2003
  2. Homer
    Replies:
    3
    Views:
    7,958
    Alexey Smirnov
    Sep 25, 2007
  3. Max
    Replies:
    0
    Views:
    381
  4. Jess
    Replies:
    1
    Views:
    208
  5. juglesh
    Replies:
    5
    Views:
    200
    Thomas 'PointedEars' Lahn
    May 15, 2005
Loading...

Share This Page