首页 文章

Web应用程序存在于本地IIS Web服务器和IIS Express Web服务器上

提问于
浏览
28

从表面上看,这看起来很像I want to use iis 7 instead of iis express in visual web developer 2010Visual Studio USE LOCAL IIS WEB SERVER issue with IIS 7.5 .

但是,我的问题是applicationhost.config中没有此应用程序的条目,并且IIS下没有指向此项目的应用程序 .

另外,当我在项目属性 - > web选项卡下更改“Project Url:”上的URL时,无论我输入什么,我都会收到同样的错误 .

Complete Original Error message (note, changed to MyServer.com because link could not point to LocalHost)

[无法创建虚拟目录 . IIS中的URL为“http://MyServer.com/MyTestProject ' exists on both the local IIS web server and the IIS Express web server. You need to edit the ' C:\ Users \ XXXXX \ Documents \ IISExpress \ config \ applicationhost.config ' file to change the port number in use by IIS Express, or use IIS Manager to change this site' s”绑定的站点 .

我可以将其更改为'http://MyServer.com/SuperLongRandomName10985486',我仍然会得到相同的错误,但现在使用新的网址 .

是的,我是以管理员身份运行VS.

似乎“陷入困境”

6 回答

  • 6

    尝试删除 applicationhost.config 或将其移动到另一个文件夹,为我工作 .

    在我的情况下,问题是该项目设置为由另一个开发人员在本地IIS启动 .

  • 45
    • 关闭解决方案

    • 删除 C:\Users\<username>\Documents\IISExpress\config 中的文件

    目录 .

    • 打开解决方案
  • 18

    编辑NotePad中的**** . sln文件,并将以下设置更改为FALSE

    <UseIISExpress>false</UseIISExpress>
    

    (会有多个实例 . )

    我一做到这一点,我的项目装得很好 .

  • 2

    对我来说它是:删除* .csproj.user文件!

  • -1

    无需删除applicationhost.config文件

    我在IIS绑定和visual studio项目URL中指定了主机名 .

    尝试从IIS绑定中删除主机名并将其留空 . 它对我有用!!!没有显示错误,我能够加载解决方案并从IIS浏览

  • 0

    我还必须更改iis express bindinginfo端口:

    来自我正在使用的80的C:\ Users \ USERNAME \ Documents \ IISExpress \ config \ applicationhost.config . 我在下面的示例中将80更改为3486 ...

    <site name="yoursite-Site" id="108">
    <other things removed just to get to showing you the bindingInfo...
    <bindings>
        <binding protocol="http" bindingInformation="*:3486:localhost" />
    </bindings>
    </site>
    

相关问题