简体   繁体   中英

VS2013 IIS Express MVC5 Subdomains not working

I have done the following.

  1. added the following to my host file

    127.0.0.1 dev.localhost.com

  2. Changed the bindings for the site in IIS express config to

     <site name="MySite" id="19"> <application path="/" applicationPool="Clr4IntegratedAppPool"> <virtualDirectory path="/" physicalPath="D:\\Projects\\MySite" /> </application> <bindings> <binding protocol="http" bindingInformation="*:9888:localhost" /> <binding protocol="http" bindingInformation="*:9888:dev.localhost.com" /> </bindings> </site> 
  3. When i "Override applciation root URL" to http://dev.localhost.com and launch the error i get is "Unable to launche the IIS Express Web Server" "The start URL specified is not valid http://dev.localhost.com " even though I have nothing in the start url box above.

and When i uncheck the override, when my site is in debug mode. going to http://dev.localhost.com results in page not found

UPDATE

I had to run IIS Express as admin for this to work.

将IIS Express设置为以admin身份运行,然后将项目url更改为http://dev.localhost.com:9888/ ,并将根url覆盖为http://dev.localhost.com:9888/,现在一切正常预期

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM