0
votes

i am using fully asp.net configured site i take it from this link http://www.codeproject.com/Articles/37660/Fully-configured-ASP-NET-Membership-Website-Templa

as a template to my project, all what i did is changing the conection string on the web.config file to point to my database

   <connectionStrings>
      <add name="AspNetMembershipTemplateConnectionString" connectionString="Data           Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Members.mdf;Integrated Security=True;User      Instance=True" providerName="System.Data.SqlClient"/>
 </connectionStrings>

and i run the project locally , but the problem that when i debug it it show this error

Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

enter image description here

i google it , and i found that happen because of the privileges but i am using my user and its administrator account , how can you help me with this problem?

2

2 Answers

1
votes

You are probably having the code in a folder that the IIS account can't access. Move to the wwwroot/Inetpub folder or grant appropriate privileges to the IIS service account for the folder where the code is in.

Edit

I was just reading the exception in the image. When you read the exception thoroughly you will even see that it suggests to edit the privileges.

0
votes

i use the project in my local pc without needing to use IIS , so i solve this by close VS2012 and reopen it as administrator .. and its work fine