Remote access to IIS Express

If you try to access the IIS Express website from a remote computer, you wont be able to do it unless you follow these steps.


Open C:\Users\[YourName]\Documents\IISExpress\config\applicationhost.config 
Look for <sites> section
In there find your site

<site name="MyWeb" id="2">
    <application path="/" applicationPool="Clr4IntegratedAppPool">
        <virtualDirectory path="/" physicalPath="E:\MyWeb" />
        <binding protocol="http" bindingInformation="*:52891:localhost" />
        <binding protocol="http" bindingInformation="*:8080:" />

Now, create another binding as highlighted. IP address is your computers' IP, port is whatever the port you want.

Allow incoming connections: Open command prompt as admin
netsh http add urlacl url= user=everyone
Open firewall:
netsh advfirewall firewall add rule name="IISExpressWeb" dir=in protocol=tcp localport=8080 profile=private remoteip=localsubnet action=allow

Popular posts from this blog

Print a sales receipt using a thermal printer with C# for POS Application

Automatic redirect upon session timeout using ASP.NET MVC and Javascript

Could not create SSL/TLS secure channel - Fixed