Home All Groups Group Topic Archive Search About

ASPNET permission to to access SQL Server Express on localhost

Author
6 Jan 2006 3:59 AM
William LaMartin
in Visual Studio 2005 I have a what is now called in 2005 a web site that
when run as a file base web connects fine to SQL Express running on the
local machine.  However, when I publish this web to a sub web of the default
web in IIS on the local machine, and load the page that accesses SQL Server
Express  in the browser it produces a permission error for ASPNET.

How do I grant ASPNET permission to SQL Server Express? I have read that I
should add ASPNET to the Administrators group, but that didn't work, and it
is something that I don't really want to do for security reasons.

Author
6 Jan 2006 4:35 PM
S. Justin Gengo
You need to give the account you are running the website under access to the
SQL Database. When running in IIS (and depending on your config settings)
the website may be attempting to access the database with the IUSR_[Machine
Name] or ASPNET account. You'll need to give the proper account permission
to the tables or stored procedures it needs.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
                            Nietzsche
Show quoteHide quote
"William LaMartin" <lamar***@tampabay.rr.com> wrote in message
news:erEhZXnEGHA.1028@TK2MSFTNGP11.phx.gbl...
> in Visual Studio 2005 I have a what is now called in 2005 a web site that
> when run as a file base web connects fine to SQL Express running on the
> local machine.  However, when I publish this web to a sub web of the
> default web in IIS on the local machine, and load the page that accesses
> SQL Server Express  in the browser it produces a permission error for
> ASPNET.
>
> How do I grant ASPNET permission to SQL Server Express? I have read that I
> should add ASPNET to the Administrators group, but that didn't work, and
> it is something that I don't really want to do for security reasons.
>
Are all your drivers up to date? click for free checkup

Author
6 Jan 2006 6:05 PM
William LaMartin
Exactly were do I go to change the account permission?  I have looked
everywhere I can think of but can't find it. All I can find is the SQL
Server Configuration Manager, but it does not appear to have anything in it
to do this.  Is it done via a command prompt command?  And if so, what
command?

Show quoteHide quote
"S. Justin Gengo" <justin@[no_spam_please]aboutfortunate.com> wrote in
message news:ukvMA9tEGHA.1124@TK2MSFTNGP10.phx.gbl...
> You need to give the account you are running the website under access to
> the SQL Database. When running in IIS (and depending on your config
> settings) the website may be attempting to access the database with the
> IUSR_[Machine Name] or ASPNET account. You'll need to give the proper
> account permission to the tables or stored procedures it needs.
>
> --
> Sincerely,
>
> S. Justin Gengo, MCP
> Web Developer / Programmer
>
> www.aboutfortunate.com
>
> "Out of chaos comes order."
>                            Nietzsche
> "William LaMartin" <lamar***@tampabay.rr.com> wrote in message
> news:erEhZXnEGHA.1028@TK2MSFTNGP11.phx.gbl...
>> in Visual Studio 2005 I have a what is now called in 2005 a web site that
>> when run as a file base web connects fine to SQL Express running on the
>> local machine.  However, when I publish this web to a sub web of the
>> default web in IIS on the local machine, and load the page that accesses
>> SQL Server Express  in the browser it produces a permission error for
>> ASPNET.
>>
>> How do I grant ASPNET permission to SQL Server Express? I have read that
>> I should add ASPNET to the Administrators group, but that didn't work,
>> and it is something that I don't really want to do for security reasons.
>>
>
>

Bookmark and Share