Iis express 使用VS2015和IIS Express覆盖站点绑定

Iis express 使用VS2015和IIS Express覆盖站点绑定,iis-express,asp.net-core,visual-studio-2015,asp.net-core-mvc,Iis Express,Asp.net Core,Visual Studio 2015,Asp.net Core Mvc,我正在使用VS2015 RC在MVC6站点中实现OAuth身份验证。该站点的前一个版本需要定制绑定,我正试图通过VS2015实现这一点。然而,事实证明,使用IIS Express进行调试是困难的 如果我修改dnx“web”命令以使用备用url,则所有操作均按预期进行: "commands": { "web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http:

我正在使用VS2015 RC在MVC6站点中实现OAuth身份验证。该站点的前一个版本需要定制绑定,我正试图通过VS2015实现这一点。然而,事实证明,使用IIS Express进行调试是困难的

如果我修改dnx“web”命令以使用备用url,则所有操作均按预期进行:

"commands": {
    "web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://www.devurl.co.uk:31122",
    "gen": "Microsoft.Framework.CodeGeneration",
    "ef":  "EntityFramework.Commands"
},

如果我尝试通过更改applicationhost.config文件(在project/.vs/config文件夹中,根据)对IIS Express执行相同的操作


…一个新的站点条目绑定到“localhost”


该站点现在正在使用localhost绑定运行。VS高兴地打开了开发人员的url,并告诉我该服务不可用


在使用IIS Express进行调试时,我如何指示VS2015使用现有站点和绑定?

我使用了此处定义的指示,但稍作修改:

为了让它工作,我离开了localhost绑定,并为*添加了一个额外的绑定。这必须在~ProjectFolder~/.vs/config/applicationhost.config中完成,而不是在文档/IISExpress的旧位置中完成

在我的案例中,更正的绑定如下所示:

<bindings>
  <binding protocol="http" bindingInformation="*:4355:localhost" />
  <binding protocol="http" bindingInformation="*:4355:*" />
</bindings>

我刚刚偶然发现了同样的问题。运气好吗?
<sites>
    <site name="WebApp1" id="1">
        <!-- removed for brevity -->
        <bindings>
            <binding protocol="http" bindingInformation="*:31122:www.devurl.co.uk" />
        </bindings>
    </site>
    <site name="WebApp1(1)" id="2">
        <!-- removed for brevity -->
        <bindings>
            <binding protocol="http" bindingInformation="*:31122:localhost" />
        </bindings>
    </site>
    <!-- removed for brevity -->
</sites>
<bindings>
  <binding protocol="http" bindingInformation="*:4355:localhost" />
  <binding protocol="http" bindingInformation="*:4355:*" />
</bindings>