Access Denied to sqlConnection

Discussion in 'ASP .Net Security' started by John Giblin, Jul 15, 2003.

  1. John Giblin

    John Giblin Guest

    I am trying to make a connection to the Db and everytime I try to open
    the connection I get "access denied"

    "ASP.NET is not authorized to access the requested resource. Consider
    granting access rights to the resource to the ASP.NET request
    identity. ASP.NET has a base process identity (typically
    {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if
    the application is not impersonating. If the application is
    impersonating via <identity impersonate="true"/>, the identity will be
    the anonymous user (typically IUSR_MACHINENAME) or the authenticated
    request user."


    Now I have asp.net process running under a service account which is
    part of the local admins.
    web.config settings
    <identity impersonate="false"/>
    <authentication mode="Windows" />

    I have IIS5 running intergrate security.

    The Connection string I used through the gui in vs.net which was able
    to see the tables. So it can see it.

    Does anyone have an idea what this is? Help me please. This is
    driving me crazy. I hate MS.

    Also, I had it under impersonate = true and the stupid app kept ask
    for my username\password\domain. Why is not using the sa account?
    Here is my connectiob string.
    this.sqlConnection1.ConnectionString = "workstation
    id=NYCNJGIBLIN;packet size=4096;user id=sa;data
    source=\"nycnjgiblin\\p" +
    "erfect\";persist security info=False;initial catalog=SitePages";

    any help would be appreciated.
    John
     
    John Giblin, Jul 15, 2003
    #1
    1. Advertising

  2. Are you using Windows authentication or moxed mode authentication on SQL
    Server?

    --
    Naveen K Kohli
    http://www.netomatix.com
    "John Giblin" <> wrote in message
    news:...
    > I am trying to make a connection to the Db and everytime I try to open
    > the connection I get "access denied"
    >
    > "ASP.NET is not authorized to access the requested resource. Consider
    > granting access rights to the resource to the ASP.NET request
    > identity. ASP.NET has a base process identity (typically
    > {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if
    > the application is not impersonating. If the application is
    > impersonating via <identity impersonate="true"/>, the identity will be
    > the anonymous user (typically IUSR_MACHINENAME) or the authenticated
    > request user."
    >
    >
    > Now I have asp.net process running under a service account which is
    > part of the local admins.
    > web.config settings
    > <identity impersonate="false"/>
    > <authentication mode="Windows" />
    >
    > I have IIS5 running intergrate security.
    >
    > The Connection string I used through the gui in vs.net which was able
    > to see the tables. So it can see it.
    >
    > Does anyone have an idea what this is? Help me please. This is
    > driving me crazy. I hate MS.
    >
    > Also, I had it under impersonate = true and the stupid app kept ask
    > for my username\password\domain. Why is not using the sa account?
    > Here is my connectiob string.
    > this.sqlConnection1.ConnectionString = "workstation
    > id=NYCNJGIBLIN;packet size=4096;user id=sa;data
    > source=\"nycnjgiblin\\p" +
    > "erfect\";persist security info=False;initial catalog=SitePages";
    >
    > any help would be appreciated.
    > John
     
    Naveen K Kohli, Jul 17, 2003
    #2
    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. Kevin Spencer
    Replies:
    3
    Views:
    3,002
    Kevin Spencer
    Aug 15, 2003
  2. Robin Shaw
    Replies:
    1
    Views:
    397
    Cowboy \(Gregory A. Beamer\) [MVP]
    Aug 12, 2004
  3. yurps
    Replies:
    1
    Views:
    386
    yurps
    May 11, 2005
  4. Robin Shaw

    Custom Control design time access to SQLConnection on Web Page

    Robin Shaw, Aug 12, 2004, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    169
    Cowboy \(Gregory A. Beamer\) [MVP]
    Aug 12, 2004
  5. Robin Shaw

    Custom Control design time access to SQLConnection on Web Page

    Robin Shaw, Aug 12, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    158
    Cowboy \(Gregory A. Beamer\) [MVP]
    Aug 12, 2004
Loading...

Share This Page