Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The invalid hostname indicates that the actual site you configured in the IIS Express configuration file is (most likely) not running. IIS Express doesn't have a process model like IIS does. </p> <hr> <p>For your site to run it would need to be started explicitly (either by opening and accessing from webmatrix, or from command line calling iisexpress.exe (from it's installation directory) with the /site parameter. </p> <hr> <p>In general, the steps to allow fully qualified DNS names to be used for local access are Let's use your example of the DNS name dev.example.com</p> <ol> <li>edit %windows%\system32\drivers\etc\hosts file to map dev.example.com to 127.0.0.1 (admin privilege required). If you control DNS server (like in Nick's case) then the DNS entry is sufficient as this step is not needed.</li> <li>If you access internet through proxy, make sure the dev.example.com will not be forwared to proxy (you have to put in on the exception list in your browser (for IE it would be Tools/Internet Options/Connections/Lan Settings, then go to Proxy Server/Advanced and put dev.example.com on the exeption list.</li> <li><p>Configure IIS Express binding for your site (eg:Site1) to include dev.example.com. Administrative privilege will be needed to use the binding. Alternatively, a one-time URL reservation can be made with http.sys using </p> <p><code>netsh http add urlacl url=http://dev.example.com:&lt;port&gt;/ user=&lt;user_name&gt;</code></p></li> <li><p>start <code>iisexpress /site:Site1</code> or open Site1 in WebMatrix</p></li> </ol>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. COHi Jaro, thanks for the help, but 127.0.0.1 is set in my DNS not the hosts file so that all the developers have the same access. Second I cannot get it to start debugging in VS, unless the binding is set as "*:1234:localhost" which is a totally useless setup, because it is bound to all IP addresses on my machine but only accepts host headers of "localhost". Why didn't they just do "127.0.0.1:1234:" and avoid all this crap. Host headers are not needed as long as the IP and port resolve. And running as Admin is just a huge pain in the ass for a large team. What a disaster IIS Express is.
      singulars
    2. COAlso just as a reference `Bad Request - Invalid Hostname` means that the hostname I am trying to use cannot resolve because the IIS Express team in their infinite wisdom decided to specifically call out "localhost" as the only host header that would work. And VS won't let you run it any other way other than "*:1234:localhost"
      singulars
    3. COI hear you on the 127.0.0.1 issue. The "localhost" in the binding is definitely a pain since it doesn't include traffic for http://127.0.0.1 . The design is limited by today's contract of http.sys (http protocol handler) that only recognizes "localhost" for the non-administrative use. The admin only requirement can be mitigated by one-time URL reservation with http.sys (will update the information above). Please let me know you exact use with Visual Studio (it is VS2010 with SP1 Beta?). Let's try to work on this some more and (hopefully) settle the issue.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload