|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
ASPNET permission to to access SQL Server Express on localhostin 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. 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. -- Show quoteHide quoteSincerely, 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. > 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. >> > >
Other interesting topics
HttpWeb Request from Class Library fails to 500
How do I convert a DataSet to a String from a WebService when debugging long delay before hitting breakpoint in page load Don't show page in browser history asp.net 2.0 caching ASP.net 2.0 GridView edit mode problems GridView and XML problems Switching from http to https and back What is ASPNETDB.MDF used for? Issues with OnTextChanged using <asp:Repeater |
|||||||||||||||||||||||