Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

visual studio 2010 unable to Publish to local web site. access denied

I just reinstalled IIS7.5 after a lot of ugly messing around. I admittedly had no idea what I was doing.

I finally was able to renamed my windows\system32\inetsrv folder so that when I reinstalled IIS, I would get the default settings.

I took a wild guess at running this and it got my site running: aspnet_regiis.exe -i

Now I just can't Publish from Visual studio to any site under wwwroot.

for example, I get the error: Unable to create the Web site location 'c:\inetpub\wwwroot\WebApplication5'. Access is denied.

My work around is to Publish elsewhere and then copy the code there--and that works.

Goodness knows what else I broke in the process, but my web site appears to work except that I can't use the Publish functionality in VS2010 because of the Access Denied error.

Do I have to grant some ASPNET built in user rights to this folder?

Here's a snapshot of the rights on my wwwroot folder:

enter image description here

like image 578
Chad Avatar asked Jun 08 '11 04:06

Chad


People also ask

How do I fix access denied in Visual Studio?

Right-click Visual Studio <VersionNumber>, select Change, and then select Repair to initiate the repair process.

How do I publish a Web service in Visual Studio 2010?

Start Visual Studio 2010 and load up the Contoso University C# solution. Click the Package/Publish Web tab. Choose the Configuration for the package. Packages are configuration specific and settings are per configuration, so you need to choose the configuration and configure the setting before creating a package.

Could not connect to the remote computer make sure that the remote computer name is correct?

If you cannot connect using the remote computer name, try using the IP address instead. You can use ipconfig in a command line on the remote computer to get the IPv4 address. If you are using a HOSTS file, verify that it is configured correctly.


1 Answers

If you are able to run your application after copying from a different location, the problem is not with IIS or the worker process; it would most likely be a permissions problem with your windows user and process (in this case, visual studio).

Try running visual studio as an administrator (if you are not a local administrator of the machine). If that works, you can give full access to your inetpub folder for your user.

like image 130
feathj Avatar answered Nov 12 '22 13:11

feathj