ASPNET permission to to access SQL Server Express on localhost

  • Thread starter William LaMartin
  • Start date
W

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.
 
S

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
 
W

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?

S. Justin Gengo said:
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 said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,708
Messages
2,569,347
Members
44,654
Latest member
7Jhamal74

Latest Threads

Top