visual Studio 2010无法发布到本地网站.拒绝访问 [英] visual studio 2010 unable to Publish to local web site. access denied

查看:167
本文介绍了visual Studio 2010无法发布到本地网站.拒绝访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在经过很多丑陋的混乱之后,我刚刚重新安装了IIS7.5.我承认我不知道自己在做什么.

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

我终于能够重命名Windows \ system32 \ inetsrv文件夹,以便在重新安装IIS时获得默认设置.

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

我对此进行了一个疯狂的猜测,它使我的网站开始运行:aspnet_regiis.exe -i

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

现在,我无法从Visual Studio发布到wwwroot下的任何站点.

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

例如,出现错误:无法创建网站位置"c:\ inetpub \ wwwroot \ WebApplication5".访问被拒绝.

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.

天哪知道我在此过程中还遇到了什么问题,但是我的网站似乎可以正常工作,只是由于访问被拒绝错误而导致我无法在VS2010中使用发布功能.

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.

我是否必须为此文件夹授予一些内置ASPNET用户权限?

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

这是我的wwwroot文件夹中的权限的快照:

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

推荐答案

如果从其他位置复制后能够运行您的应用程序,则问题不在于IIS或辅助进程;否则,请执行以下步骤: Windows用户和进程(在本例中为Visual Studio)很可能是权限问题.

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

尝试以管理员身份运行Visual Studio(如果您不是计算机的本地管理员).如果可行,您可以为用户授予对inetpub文件夹的完全访问权限.

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.

这篇关于visual Studio 2010无法发布到本地网站.拒绝访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆