"Access Denied" to sql server ....help...

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default "Access Denied" to sql server ....help...

    Hello...
    I created an asp.net app that works great on my local
    workstation. We are using forms based authentication and
    I use the localhost IIS and a Sql Server on a different
    server. The login page accepts a username and password
    and then attempts to open a connection to the sql
    server. As I wrote, this works fine on my machine.
    However, now that the asp.net app has been copied to our
    server....I get an error that access is denied or that
    the sql server does not exist. I looked through all of
    the msdn articles and various web sites to find a
    solution...and none of them have helped. I made sure to
    add the Asp.net user account to my sql server and set its
    database permissions accordingly...yet still this error
    persists.

    Does anyone have any thoughts or suggestions?

    thanks in advance,
    dw
    dw Guest

  2. Similar Questions and Discussions

    1. "Access Denied" Error After Server Change
      I have a number of hosting clients that use Contribute. Since I upgraded my hosting server, they are unable to connect - or more accurately, they...
    2. "Server does not exist or access is denied"
      Hi, I am trying to connect a web service to an SQL Server 2000 database. SQL Server is installed and started and the database appears on the...
    3. "Access is denied" error when running schtasks.exe under ASPNET account in win2k3 server
      Hi all, I am trying to run schtasks.exe from asp.net application wich uses forms authentication under ASPNET account. It gives me "Access is...
    4. HELP! "Access is denied to this object." - Server object error 'ASP 0178 : 80070005'
      Hi, When I try to do Server.CreateObject on an activeX DLL, I receive the following message: ''''''''''''''''''''''' Server object error 'ASP...
    5. Error: "Unable to debug on server,Access is denied"
      I installed dotnet and when i try to run a web application i get the error messagebox saying "Unable to debug on server,Access is denied.Would you...
  3. #2

    Default Re: "Access Denied" to sql server ....help...

    Chris...thanks for the feedback. I'll check out that
    link. I might not have been clear in my question, but I
    don't think that I want to authenticate to a different
    box. What needs to happen...is if someone browses to
    this web site (from anywhere) they can input their user
    login and password and once they're authenticated, they
    can access the rest of the asp.net app. Shouldn't the
    local asp.net user account on this server allow me to do
    that? Or, do I still need to configure my app for
    impersonation?

    thank you,
    dw
    >-----Original Message-----
    >The ASP.NET user account is a local account. You should
    configure your
    >application to use impersonation to obtain domain
    account credentials if you
    >want to authenticate to a different box. The identity
    matrix can be found
    >here:
    >[url]http://msdn.microsoft.com/library/default.asp?[/url]
    url=/library/en-us/dnnetsec/html/SecNetAP05.asp
    >
    >--
    >Chris Jackson
    >Software Engineer
    >Microsoft MVP - Windows XP
    >Windows XP Associate Expert
    >--
    >"dw" <dw@noSpam.com> wrote in message
    >news:014f01c36684$5ad43a00$a601280a@phx.gbl...
    >> Hello...
    >> I created an asp.net app that works great on my local
    >> workstation. We are using forms based authentication
    and
    >> I use the localhost IIS and a Sql Server on a different
    >> server. The login page accepts a username and password
    >> and then attempts to open a connection to the sql
    >> server. As I wrote, this works fine on my machine.
    >> However, now that the asp.net app has been copied to
    our
    >> server....I get an error that access is denied or that
    >> the sql server does not exist. I looked through all of
    >> the msdn articles and various web sites to find a
    >> solution...and none of them have helped. I made sure
    to
    >> add the Asp.net user account to my sql server and set
    its
    >> database permissions accordingly...yet still this error
    >> persists.
    >>
    >> Does anyone have any thoughts or suggestions?
    >>
    >> thanks in advance,
    >> dw
    >
    >
    >.
    >
    dw Guest

  4. #3

    Default Re: "Access Denied" to sql server ....help...

    Impersonation is for authentication to other resources - which was what you
    talked about in your original post. You can do forms authentication on
    ASP.NET while using impersonation, if that is your question. But I thought
    the problem was an access denied on your SQL Server box? That's what I was
    trying to help you with.

    --
    Chris Jackson
    Software Engineer
    Microsoft MVP - Windows XP
    Windows XP Associate Expert
    --
    "dw" <dw@noSpam.com> wrote in message
    news:032b01c36692$45a6bf00$a501280a@phx.gbl...
    > Chris...thanks for the feedback. I'll check out that
    > link. I might not have been clear in my question, but I
    > don't think that I want to authenticate to a different
    > box. What needs to happen...is if someone browses to
    > this web site (from anywhere) they can input their user
    > login and password and once they're authenticated, they
    > can access the rest of the asp.net app. Shouldn't the
    > local asp.net user account on this server allow me to do
    > that? Or, do I still need to configure my app for
    > impersonation?
    >
    > thank you,
    > dw
    >
    > >-----Original Message-----
    > >The ASP.NET user account is a local account. You should
    > configure your
    > >application to use impersonation to obtain domain
    > account credentials if you
    > >want to authenticate to a different box. The identity
    > matrix can be found
    > >here:
    > >[url]http://msdn.microsoft.com/library/default.asp?[/url]
    > url=/library/en-us/dnnetsec/html/SecNetAP05.asp
    > >
    > >--
    > >Chris Jackson
    > >Software Engineer
    > >Microsoft MVP - Windows XP
    > >Windows XP Associate Expert
    > >--
    > >"dw" <dw@noSpam.com> wrote in message
    > >news:014f01c36684$5ad43a00$a601280a@phx.gbl...
    > >> Hello...
    > >> I created an asp.net app that works great on my local
    > >> workstation. We are using forms based authentication
    > and
    > >> I use the localhost IIS and a Sql Server on a different
    > >> server. The login page accepts a username and password
    > >> and then attempts to open a connection to the sql
    > >> server. As I wrote, this works fine on my machine.
    > >> However, now that the asp.net app has been copied to
    > our
    > >> server....I get an error that access is denied or that
    > >> the sql server does not exist. I looked through all of
    > >> the msdn articles and various web sites to find a
    > >> solution...and none of them have helped. I made sure
    > to
    > >> add the Asp.net user account to my sql server and set
    > its
    > >> database permissions accordingly...yet still this error
    > >> persists.
    > >>
    > >> Does anyone have any thoughts or suggestions?
    > >>
    > >> thanks in advance,
    > >> dw
    > >
    > >
    > >.
    > >

    Chris Jackson Guest

  5. #4

    Default Re: "Access Denied" to sql server ....help...

    So, you are dynamically building a connection string to your SQL Server to
    include the user name and password that the user logs in with? Can you
    sterilize and post the code that you use to do this?

    --
    Chris Jackson
    Software Engineer
    Microsoft MVP - Windows XP
    Windows XP Associate Expert
    --
    "dw" <dw@noSpam.com> wrote in message
    news:039201c36743$45266600$a101280a@phx.gbl...
    > Chris...
    > I appreciate the help.
    >
    > What I am tyring to accomplish (and hopefully I am
    > describing this clearly) is to allow a user, coming into
    > our web site from anywhere to access our login page,
    > which attempts to connect to the sql server (which exists
    > on the same machine as the web server...all on one box)
    > using the login and password that the user inputs on the
    > Login form.
    >
    > When I test with my local machine (IIS locally, but
    > connecting to the sql server on the above mentioned box)
    > this works fine. I am able to successfully connect to
    > the sql server.
    >
    > However, when the asp.net app is copied to the real web
    > server (which also has sql server on it)...this is where
    > we get the "Access Denied" message.
    >
    > I am assuming...still...that this is a permissions
    > problem with the ASP.Net user account. Short of trying
    > anything else...I am thinking of un-installing IIS
    > and .Net and then re-installing to see if that cures this
    > problem.
    >
    > thanks,
    > dw
    > >-----Original Message-----
    > >Impersonation is for authentication to other resources -
    > which was what you
    > >talked about in your original post. You can do forms
    > authentication on
    > >ASP.NET while using impersonation, if that is your
    > question. But I thought
    > >the problem was an access denied on your SQL Server box?
    > That's what I was
    > >trying to help you with.
    > >
    > >--
    > >Chris Jackson
    > >Software Engineer
    > >Microsoft MVP - Windows XP
    > >Windows XP Associate Expert
    > >--
    > >"dw" <dw@noSpam.com> wrote in message
    > >news:032b01c36692$45a6bf00$a501280a@phx.gbl...
    > >> Chris...thanks for the feedback. I'll check out that
    > >> link. I might not have been clear in my question, but
    > I
    > >> don't think that I want to authenticate to a different
    > >> box. What needs to happen...is if someone browses to
    > >> this web site (from anywhere) they can input their user
    > >> login and password and once they're authenticated, they
    > >> can access the rest of the asp.net app. Shouldn't the
    > >> local asp.net user account on this server allow me to
    > do
    > >> that? Or, do I still need to configure my app for
    > >> impersonation?
    > >>
    > >> thank you,
    > >> dw
    > >>
    > >> >-----Original Message-----
    > >> >The ASP.NET user account is a local account. You
    > should
    > >> configure your
    > >> >application to use impersonation to obtain domain
    > >> account credentials if you
    > >> >want to authenticate to a different box. The identity
    > >> matrix can be found
    > >> >here:
    > >> >[url]http://msdn.microsoft.com/library/default.asp?[/url]
    > >> url=/library/en-us/dnnetsec/html/SecNetAP05.asp
    > >> >
    > >> >--
    > >> >Chris Jackson
    > >> >Software Engineer
    > >> >Microsoft MVP - Windows XP
    > >> >Windows XP Associate Expert
    > >> >--
    > >> >"dw" <dw@noSpam.com> wrote in message
    > >> >news:014f01c36684$5ad43a00$a601280a@phx.gbl...
    > >> >> Hello...
    > >> >> I created an asp.net app that works great on my
    > local
    > >> >> workstation. We are using forms based
    > authentication
    > >> and
    > >> >> I use the localhost IIS and a Sql Server on a
    > different
    > >> >> server. The login page accepts a username and
    > password
    > >> >> and then attempts to open a connection to the sql
    > >> >> server. As I wrote, this works fine on my machine.
    > >> >> However, now that the asp.net app has been copied to
    > >> our
    > >> >> server....I get an error that access is denied or
    > that
    > >> >> the sql server does not exist. I looked through
    > all of
    > >> >> the msdn articles and various web sites to find a
    > >> >> solution...and none of them have helped. I made
    > sure
    > >> to
    > >> >> add the Asp.net user account to my sql server and
    > set
    > >> its
    > >> >> database permissions accordingly...yet still this
    > error
    > >> >> persists.
    > >> >>
    > >> >> Does anyone have any thoughts or suggestions?
    > >> >>
    > >> >> thanks in advance,
    > >> >> dw
    > >> >
    > >> >
    > >> >.
    > >> >
    > >
    > >
    > >.
    > >

    Chris Jackson Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139