我想在visual web developer 2010中使用iis 7而不是iis express

Mik*_*ike 8 .net visual-web-developer

我在设置我的vwd 2010环境时遇到了一些麻烦,无法在我的本地iis 7.5而不是iis express下运行.

每当我转到项目属性并选择"web"选项卡时,我选择"服务器","本地iis Web服务器".它会自动放入项目URL http:// localhost/myprojectname.

我单击创建虚拟目录,它出现此警告,,,

'无法创建虚拟目录.url http:// localhost/myprojectname的站点存在于本地IIS Web服务器和IIS Express Web服务器上.您需要编辑'c:\ Users\Mike\Documents\iisexpress\config\applicationhost.config'文件来更改iis express使用的端口号,或使用iis manager更改iis中的站点绑定.

在解释为什么我不能使用内置功能来使用iis 7.5而不是iis express时,非常感谢您的帮助.

先感谢您.

Ada*_*SFT 10

出现此问题的原因是IISExpress中的站点设置绑定到端口80,常规IIS也使用该端口.

在提到时打开applicationhost.config并查找类似的内容:


<site name="SomeAppName-Site" id="15">
    <application path="/" applicationPool="Clr4IntegratedAppPool">
    <virtualDirectory path="/" physicalPath="C:\Users\YourName\Documents\My Web Sites\SomeProjectsWebSite" />
    </application>
    <bindings>
       <binding protocol="http" bindingInformation="*:80:localhost" />
    </bindings>
</site>
Run Code Online (Sandbox Code Playgroud)

请注意部分说:80将其更改为其他端口,因此它不与80共享,并且不会被IISExpress中的其他应用程序使用.您可以查看applicationhost.config中的其他站点节点以查找未使用的站点节点,或者尝试8081作为初学者.


Str*_*ior 0

您可能已经在 IIS 中设置了一个名为“myprojectname”的网站。转到它提到的配置文件并找到定义该项目的位置。从 XML 中删除该节点,然后重试。

  • 我已经尝试过了,但没有成功。感谢您的回复和时间。事实上,我很沮丧,刚刚卸载了 iis express,现在它似乎按预期工作。再次感谢您抽出时间。 (2认同)