Results 1 to 11 of 11

Thread: The ASPNET Sql Server Account

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2000
    Location
    Birmingham, AL
    Posts
    1,276

    Question The ASPNET Sql Server Account

    What's the proper way to setup this account in SQL Server?

    We're using Windows authentication on our network and to give any user permission in the database I have to grant it to the ASPNET account. This seems to defeat the purpose of using Windows authentication because anyone that opens the ASP.NET page will have those rights in the database even if they aren't listed as a user in the DB.

    For example, I give read-only rights to the ASPNET account and even if I give an individual user db_datawriter rights, they still cannot write to the DB unless I grant the ASPNET account db_datawriter rights. Then anyone can save/modify the data.

  2. #2
    Fanatic Member
    Join Date
    Oct 1999
    Location
    England
    Posts
    982
    Is SQL server installed on the same machine as IIS?

    This will have an impace on how the ASPNET user operates.


    Things I do when I am bored: DotNetable

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2000
    Location
    Birmingham, AL
    Posts
    1,276
    Both are on the same machine.

  4. #4
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    set impersonation on in the web config file

    <impersonate=true/>

    Or something to that affect....

  5. #5
    Fanatic Member
    Join Date
    Oct 1999
    Location
    England
    Posts
    982
    This is a good article on the microsoft site, it explains the different methods for accessing SQL server.

    http://msdn.microsoft.com/library/de...pplication.asp

    This is also a good article.
    http://support.microsoft.com/default...b;en-us;815154


    Things I do when I am bored: DotNetable

  6. #6

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2000
    Location
    Birmingham, AL
    Posts
    1,276
    Originally posted by hellswraith
    set impersonation on in the web config file

    <impersonate=true/>

    Or something to that affect....
    that did the trick. well actually it was

    <identity impersonate="true" />

    then you can get rid of the ASPNET account if using Windows authentication.

  7. #7
    Fanatic Member
    Join Date
    Oct 1999
    Location
    England
    Posts
    982
    Does anyone know if this impersonate would work if IIS and SQL server are on different machines.
    I have a feeling it won't but I am happy to be told I am wrong.


    Things I do when I am bored: DotNetable

  8. #8

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2000
    Location
    Birmingham, AL
    Posts
    1,276
    I'm pretty sure they have to be on the same machine. I think I read that on MSDN.

  9. #9
    Fanatic Member
    Join Date
    Oct 1999
    Location
    England
    Posts
    982
    That was my understanding. The first article in on of my previous posts talks about it.
    Sometimes I wonder if I understand it the way they mean it.


    Things I do when I am bored: DotNetable

  10. #10

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2000
    Location
    Birmingham, AL
    Posts
    1,276
    From my interpretation of the article, You need to have the SQL Server and IIS (web server) on the same machine if you want to use Windows authentication OR anonymous access with the ASPNET account.

    If you want to access the SQL Server using a Mapped Windows Domain User or prompting for the username and password and passing them as credentials then you don't need the SQL Server and web server on the same machine.

  11. #11
    Fanatic Member
    Join Date
    Oct 1999
    Location
    England
    Posts
    982
    I went on ASP.NET training last week where IIS and SQL were on the same server, the ASPNET account was used.
    We came away thinking that is how it naturally worked. It took me half a day and some searching to find out it wasn't so cut and dried.


    Things I do when I am bored: DotNetable

Posting Permissions

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



Click Here to Expand Forum to Full Width