asp.net mvc - Bad Request - Invalid Hostname - Host files already fixed -
according other questions problem has been solved editing hosts file , applicationhost file. these 2 files setup on machine. error started ocurrring right after upgraded visual studio 2015 sp1
http://bdtest.localhost:50119/ returns bad request
hosts file -
localhost name resolution handled within dns itself.
127.0.0.1 localhost
::1 localhost
127.0.0.1 bdtest.localhost
application hosts file
<site name="bizdox.web" id="2"> <application path="/" applicationpool="clr4classicapppool"> <virtualdirectory path="/" physicalpath="c:\source\bizdox\summer2015-navigation\bizdox.web" /> </application> <bindings> <binding protocol="http" bindinginformation="*:50119:*"/> <binding protocol="http" bindinginformation="*:50119:localhost" /> <binding protocol="http" bindinginformation="*:50119:bdtest.localhost" /> <binding protocol="http" bindinginformation="*:50119:demo.localhost" /> <binding protocol="http" bindinginformation="*:50119:diy.localhost" /> <binding protocol="http" bindinginformation="*:50119:akuity.localhost" /> <binding protocol="http" bindinginformation="*:50119:owlsfactory.localhost" /> <binding protocol="http" bindinginformation="*:50119:rtp.localhost" /> <binding protocol="http" bindinginformation="*:50119:barebones.localhost" /> <binding protocol="http" bindinginformation="*:50119:sygnet.localhost" /> <binding protocol="http" bindinginformation="*:50119:firstsolution.localhost" /> </bindings> </site> what else cause 400 error if host files setup?
i running vs2015 admin.
vs 2015 changes default applicationhost.config file located in mydocuments/iisexpress project specific applicationhost.config file. can find in web project under hidden .vs folder.
your 2 options either open folder , edit applicatoinhost.config file or tell .proj file use default config file located in documents/iisexpress. have alter/add line .proj file.
<useglobalapplicationhostfile>true</useglobalapplicationhostfile>
add top of file inside <propertygroup> tag
make sure close vs , re-open changes take effect. make sure run administrator.
Comments
Post a Comment