How to enable external request on IIS Express

If you put to your browser URL address which contains different server name/IP address then localhost. You will see error “Bad Request – Invalid Hostname” or information that page is not accessible. There are workaround how can you connect to your IIS Express from different computer in network.



Configure IIS Express

  1. Go to the folder “..\My Documents\IISExpress\config\” in your home
  2. Open file “applicationhost.config” in your favorite text editor
  3. Find lines (port number can be different)
         <binding protocol="http" bindingInformation="*:50280:localhost" />
  4. Rewrite localhost to *
  5. Lines should look like
         <binding protocol="http" bindingInformation="*:50280:*" />
  6. Save file and restart IIS Express

Reserve IIS Express URL for non-administrator accounts

  1. Run command line as Administrator
  2. Run command (modify port number by your IIS Express listening port)
    netsh http add urlacl url=http://*:50280/ user=everyone

Enable port on firewall

  1. Go to the “Control Panel\System and Security\Windows Firewall”
  2. Click “Advanced settings”
  3. Select “Inbound Rules”
  4. Click on “New Rule …” button
  5. Select “Port”, click “Next”
  6. Fill your IIS Express listening port number (in my case 50280), click “Next”
  7. Select “Allow the connection”, click “Next”
  8. Check where you would like allow connection to IIS Express (Domain, Private, Public), click “Next”
  9. Fill rule name (e.g “IIS Express), click “Finish”


4 thoughts to “How to enable external request on IIS Express”

  1. Oh my goodness! Amazing article dude! Thanks, However I am eexperiencing troubles with your
    RSS. I don’t know why I can’t subscrkbe to it.
    Is there anybody having identical RSS problems?
    Anyone that knows the solution will youu kindly respond?


  2. I like the helpful information yyou supply in your articles.
    I’ll bookmark your blog and take a look at once
    more right here regularly. I’m fairoy certain I will be
    informed plenty of new stuff proper here! Best of luck for
    the next!

  3. An impressive share! I’ve just forwarded this onbto a friend
    who had been conducting a little research oon this. And he actually bought me breakfast due to the fact that I discovered it for him…
    lol. So allow me to redword this…. Thanks foor the meal!!

    But yeah, thanx ffor spending soime time tto discuss
    this issue here on your internet site.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.