Vous êtes sur la page 1sur 3

4/24/2017 Bad Request ­ Invalid Hostname enable external request on IIS Express

How to enable external request on IIS Express


 24 April, 2014 (http://www.korecky.org/?p=1199&langswitch_lang=en)  Vladislav Korecký (http://www.korecky.org/?author=1)  .NET (http://www.korecky.org/?
cat=4&langswitch_lang=en)

If you put to your browser URL address which contains diúerent 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 diúerent computer in network.

(https://i0.wp.com/www.korecky.org/wp-content/iisExpress.png)

Sharepoint Online
Responsive Themes and Master Pages Predefined Layout and Web Parts!
Go to sharepointpackages.com

Con韑�gure IIS Express


1. Go to the folder “..\My Documents\IISExpress\conóg\” in your home
2. Open óle “applicationhost.conóg” in your favorite text editor
3. Find lines (port number can be diúerent)

 <bindings> 
     <binding protocol="http" bindingInformation="*:50280:localhost" /> 
 </bindings>

4. Rewrite localhost to *
5. Lines should look like

<bindings> 
     <binding protocol="http" bindingInformation="*:50280:*" /> 
</bindings>

6. Save óle 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 韑�rewall


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”

HostGator™ Hosting
Easy & Affordable Web Hosting. 24/7 Support Included. Go to hostgator.com

http://www.korecky.org/?p=1199 1/3
4/24/2017 Bad Request ­ Invalid Hostname enable external request on IIS Express

Share this:

 Print (http://www.korecky.org/?p=1199&langswitch_lang=en#print)  Facebook (http://www.korecky.org/?p=1199&langswitch_lang=en&share=facebook&nb=1)

 Google (http://www.korecky.org/?p=1199&langswitch_lang=en&share=google-plus-1&nb=1)

 Twitter (http://www.korecky.org/?p=1199&langswitch_lang=en&share=twitter&nb=1)

 LinkedIn (http://www.korecky.org/?p=1199&langswitch_lang=en&share=linkedin&nb=1)  Email (http://www.korecky.org/?p=1199&langswitch_lang=en&share=email&nb=1)

No related posts.

.NET (http://www.korecky.org/?tag=net) IIS (http://www.korecky.org/?tag=iis) Windows (http://www.korecky.org/?tag=windows)

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

RSC
20 August 2014 at 10:40 AM (http://www.korecky.org/?p=1199&langswitch_lang=en#comment-4171)

Perfect solution. Thanks man.

REPLY (HTTP://WWW.KORECKY.ORG/?P=1199&LANGSWITCH_LANG=EN&REPLYTOCOM=4171#RESPOND)

MADS
17 February 2015 at 11:49 PM (http://www.korecky.org/?p=1199&langswitch_lang=en#comment-4189)

Thanks. Cheers!

REPLY (HTTP://WWW.KORECKY.ORG/?P=1199&LANGSWITCH_LANG=EN&REPLYTOCOM=4189#RESPOND)

NINGO
5 June 2015 at 11:01 PM (http://www.korecky.org/?p=1199&langswitch_lang=en#comment-4195)

perfect buddy!! you r genius

REPLY (HTTP://WWW.KORECKY.ORG/?P=1199&LANGSWITCH_LANG=EN&REPLYTOCOM=4195#RESPOND)

ALI (HTTP://WWW.HAMAVARD-TEC.IR)
3 April 2016 at 9:16 AM (http://www.korecky.org/?p=1199&langswitch_lang=en#comment-4208)

This soulution work for me. very thanks


I tested very approach but didnt work i test this solution on windows8 with iisexpress 8
an visual studio 2013 and quitely work. thanks

REPLY (HTTP://WWW.KORECKY.ORG/?P=1199&LANGSWITCH_LANG=EN&REPLYTOCOM=4208#RESPOND)

LEAVE A REPLY

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

Comment

http://www.korecky.org/?p=1199 2/3
4/24/2017 Bad Request ­ Invalid Hostname enable external request on IIS Express
Name *

Email *

Website

POST COMMENT

Notify me of follow-up comments by email.

Notify me of new posts by email.

 Wss 3.0 crawl tips (http://www.korecky.org/?p=567&langswitch_lang=en)

SEARCH

Search… 

(http://www.twitter.com/vkorecky) (https://www.facebook.com/vkorecky)

(https://plus.google.com/u/0/107344336518798467930/posts) (https://www.linkedin.com/pub/vladislav-koreck%C3%BD/30/b93/810)

CATEGORIES

 .NET (http://www.korecky.org/?cat=4&langswitch_lang=en)

 Uncategorized (http://www.korecky.org/?cat=1&langswitch_lang=en)

 AI (http://www.korecky.org/?cat=103&langswitch_lang=en)

 Java (http://www.korecky.org/?cat=37&langswitch_lang=en)

 Linux (http://www.korecky.org/?cat=13&langswitch_lang=en)

 macOS (http://www.korecky.org/?cat=126&langswitch_lang=en)

 Miscellaneous (http://www.korecky.org/?cat=70&langswitch_lang=en)

 R programming (http://www.korecky.org/?cat=89&langswitch_lang=en)

GOOGLE ADS

http://www.korecky.org/?p=1199 3/3

Vous aimerez peut-être aussi