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作为初学者.
您可能已经在 IIS 中设置了一个名为“myprojectname”的网站。转到它提到的配置文件并找到定义该项目的位置。从 XML 中删除该节点,然后重试。
| 归档时间: |
|
| 查看次数: |
12301 次 |
| 最近记录: |