开发者

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

I just reinstalled IIS7.5 after a lot of ugly messing aro开发者_开发百科und. 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:

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


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.


Late to this thread but I fixed this issue by going to:

c:\inetpub\wwwroot\myApplication > right click > properties > security > select Users(myMachine\Users) change access to full


Hopefully this thread is still alive. I had this problem and here is how I resolved it:

Try opening a file on the remote site from Visual Studio by File>Open File...

If you don't have access you will be challenged with Windows Sign in. Here you can enter your credentials for accessing the REMOTE site. Once you enter the credentials and the file is successfully opened you will be able to publish. Occassionally (I don't know why) the credentials will become invalid at which time all you have to do is open a file and reenter them.


Another solution is to create a share to your local c:\inetpub\wwwroot dir (give yourself read/write permissions) and publish to the share like so: \\mypc\wwwroot\mywebsite. It helped me get around the annoying UAC security without disabling it.


Web Deploy is likely to execute under the user name Local Service. Check the permissions for this user.


I'm having a similar problem

Access to the path 'C:\Sources\x\bin\Debug\netcoreapp2.1\publish' is denied. Unable to create the Web site location Access is denied.

Access is denied because a subfolder is open in file explorer and locked by file explorer.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜