I am implementing OAuth authentication on an MVC6 site using VS2015 RC. The previous incarnation of the site required user binding, and I am trying to achieve the same with VS2015. However, debugging with IIS Express is difficult.
If I change the dnx "web" command to use an alternate URL, everything works as expected:
"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" },

If I try to do the same with IIS Express by changing the applicationhost.config file (in the project / .vs / config folder according to the wildcard host name in IIS Express + VS 2015 ) ...
<sites> <site name="WebApp1" id="1"> <bindings> <binding protocol="http" bindingInformation="*:31122:www.devurl.co.uk" /> </bindings> </site> </sites>
... the new site entry is bound to "localhost".
<sites> <site name="WebApp1" id="1"> <bindings> <binding protocol="http" bindingInformation="*:31122:www.devurl.co.uk" /> </bindings> </site> <site name="WebApp1(1)" id="2"> <bindings> <binding protocol="http" bindingInformation="*:31122:localhost" /> </bindings> </site> </sites>
The site is now running using the localhost binding. VS happily opens the dev url and tells me that the service is unavailable.

How can I instruct VS2015 to use an existing site and bind when debugging using IIS Express?
asp.net-core visual-studio-2015 asp.net-core-mvc iis-express
Keith davidson
source share