asp.net core - Override site binding using VS2015 and IIS Express -
i'm implementing oauth authentication in mvc6 site using vs2015 rc. previous incarnation of site required custom binding , i'm trying achieve same vs2015. debugging iis express, however, proving difficult.
if amend dnx "web" command use alternate url, works 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 try , same thing iis express changing applicationhost.config file (within project/.vs/config folder per wildcard hostname in iis express + vs 2015)...
<sites> <site name="webapp1" id="1"> <!-- removed brevity --> <bindings> <binding protocol="http" bindinginformation="*:31122:www.devurl.co.uk" /> </bindings> </site> <!-- removed brevity --> </sites>
...a new site entry binding "localhost".
<sites> <site name="webapp1" id="1"> <!-- removed brevity --> <bindings> <binding protocol="http" bindinginformation="*:31122:www.devurl.co.uk" /> </bindings> </site> <site name="webapp1(1)" id="2"> <!-- removed brevity --> <bindings> <binding protocol="http" bindinginformation="*:31122:localhost" /> </bindings> </site> <!-- removed brevity --> </sites>
the site running using localhost binding. vs happily opens dev url , tells me service unavailable.
how can instruct vs2015 use existing site , binding when debugging iis express?
i used instructions defined here slight modification:
wildcard hostname in iis express + vs 2015
in order make work left localhost binding , added additional binding *. must done in ~projectfolder~/.vs/config/applicationhost.config , not in old location of documents/iisexpress.....
the corrected binding looks in case:
<bindings> <binding protocol="http" bindinginformation="*:4355:localhost" /> <binding protocol="http" bindinginformation="*:4355:*" /> </bindings>
Comments
Post a Comment