it:ad:iis_express:howto:serve_other_than_localhost

IT:AD:IIS Express:HowTo:Serve other than localhost

  • To serve external requests edit applicationhost.config file.
    • change localhost to '' or your machine name. * Note:* for non-localhost binding you must be running as administrator or set URL acl as an administrator and then run iisexpress as non-administrator Find the website definition: eg: <site name=“MvcApplication1-Site” id=“3”> <!– NAB.APOS - do not rename (or IIS Express can't be started) –> <application path=“/” applicationPool=“Clr4IntegratedAppPool”> <virtualDirectory path=“/” physicalPath=“C:\Users\Sky\Documents\My Web Sites\MvcApplication1-Site” /> </application> <application path=“/Test” applicationPool=“Clr4IntegratedAppPool”> <virtualDirectory path=“/” physicalPath=“C:\Users\Sky\Documents\Visual Studio 2012\Projects\MvcApplication1\MvcApplication1” /> </application> <application path=“/PM” applicationPool=“Clr4IntegratedAppPool”> <virtualDirectory path=“/” physicalPath=“C:\Users\SHARED\TFS\NAB\APOS\trunk\Source\Nab.Wdms.ProcessManagement\Nab.Wdms.PM.Core.AppHost.Web” /> </application> <application path=“/PMS” applicationPool=“Clr4IntegratedAppPool”> <virtualDirectory path=“/” physicalPath=“C:\Users\SHARED\TFS\NAB\APOS\trunk\Source\Nab.Wdms.ProcessManagement\Nab.Wdms.PM.Core.AppHost.Services” /> </application> <bindings> <binding protocol=“http” bindingInformation=“:10002:” /> </bindings> </site> and modify the bindings: Before: <binding protocol=“http” bindingInformation=“:10002:localhost” /> After: <binding protocol=“http” bindingInformation=“:10002:” />. >BIG WARNING: > If you restart Visual Studio when not in Admin Mode, it will create a brand new entry (with a suffix in the name, and new site id) and you'll see the changes no longer applied. In case you weren’t aware, HTTP.SYS is the OS component that both IIS and IIS Developer Express use to handle HTTP requests. By default, HTTP.SYS won’t allow an application running as a standard user to listen over the wire. It is possible to explicitly configure HTTP.SYS to allow external traffic as shown below. However you will need to be an administrator. For more details look at Configuring HTTP and HTTPS. The commands you will need to run in this situation are as follows. Set URL ACL: netsh http add urlacl url=http::10002/ user=Everyone“ ## Removing YOu can later delete: netsh http delete urlacl url=http:*:10002/ ## Resources ## * http://stackoverflow.com/questions/5235826/using-iis-express-to-host-a-website-temporarily * http://blogs.iis.net/vaidyg/archive/2010/07/29/serving-external-traffic-with-webmatrix-beta.aspx
  • /home/skysigal/public_html/data/pages/it/ad/iis_express/howto/serve_other_than_localhost.txt
  • Last modified: 2023/11/04 01:45
  • by 127.0.0.1