How can I enable remote requests in IIS Express? Scott Guthrie wrote that is possible but he didn\'t say how.
Another way to access external requests is to use IIS instead of IIS Express. In my visual studio, I can just switch easily.
You may try setting up port forwarding instead of trying to modify your IIS Express config, adding new HTTP.sys rules or running Visual Studio as an Admin.
Basically you need to forward the IP:PORT
your website runs at to some other free port on your machine but on the external network adapter, not localhost.
The thing is that IIS Express (at least on Windows 10) binds to [::1]:port
meaning it listens on IPv6 port. You need to take this into account.
Here is how I made this work - http://programmingflow.com/2017/02/25/iis-express-on-external-ip.html
Hope it helps.
I solved this problem by using reverse proxy approach.
I installed wamp server and used simple reverse proxy feature of apache web server.
I added a new port to listen to Apache web server (8081). Then I added proxy configuration as virtualhost for that port.
<VirtualHost *:8081>
ProxyPass / http://localhost:46935/
ProxyPassReverse / http://localhost:46935/
</VirtualHost>
I did the following and was able to connect:
1) changed IIS express config binding from local host to '*'
binding protocol="http" bindingInformation="*:8888:*"
2) Defined inbound rule on firewall to allow the particular port for the protocol type: tcp
3) Add the following command to add network configuration for your port: netsh http add urlacl url=http://*:8888/ user=everyone
I had a local IIS enabled so i just created a rewrite rule to my debugging port... I think this is better and cooler than other method because it is easier to remove once am done developing... Here is how the rewrite looks..
<rewrite>
<rules>
<rule name="ReverseProxyInboundRule1" stopProcessing="true">
<match url="^dev/(.*)" />
<action type="Rewrite" url="http://localhost:47039/{R:1}" />
</rule>
</rules>
</rewrite>
VS also allows you to develop using your local IIS directly (which then allows remote connections) but in turn you must always run it as an administrator... I dont like that.
If you have tried Colonel Panic's answer but doesn't work in Visual Studio, try this:
Append another <binding />
in your IIS Express config
<bindings>
<binding protocol="http" bindingInformation="*:8080:localhost" />
<binding protocol="http" bindingInformation="*:8080:hostname" />
</bindings>
Finally, you have to run Visual Studio as Admin