A simple, yet practical command-line utility enabling .NET developers to test web applications served by IIS Express on remote devices.
Are you a .NET developer building mobile web applications? Have you ever been frustrated by the fact that there's no easy way to enable IIS Express to accept connections from remote devices?...
Most likely you'll want iisexpress-proxy installed as a global module:
npm install -g iisexpress-proxy
Note: You need to have Node.js installed.
If you installed iisexpress-proxy as a global module:
iisexpress-proxy localPort to proxyPort
For instance, if your application's IIS Express port is 51123, run this in the Command Prompt:
iisexpress-proxy 51123 to 3000
The program will list the external addresses you can use for testing your application on remote devices.
You can also use iisexpress-proxy to expose an IIS server instance running on a different host accessible through VPN, like this:
iisexpress-proxy host:port to proxyPort
For instance, let's conside this scenario:
- the application is running on 192.168.96.3:5000 and it only accepts connections from clients within a VPN;
- your development machine has a network interface within the same VPN and another publicly accessible one (192.168.0.102);
- you need to test the application from mobile devices without having to add those devices to the VPN.
By running this in the Command Prompt:
iisexpress-proxy 192.168.96.3:5000 to 3000
...you'll be able to access the application by pointing the mobile devices to 192.168.0.102:3000.
Note: This functionality was added at v1.1.0 (released 10/21/2015).
It's proxying the HTTP traffic on localPort
to proxyPort
on all the available network interfaces and it's also changing the origin of the host header, allowing you to test web applications hosted by IIS Express on various remote devices (mobile devices, other desktops, etc.).
This command-line utility is a simple wrapper around http-proxy. The original http-proxy logo was created by Diego Pasquali. Elements from a business vector designed by Freepik were used in the above diagram.
If you find this piece of software useful, please tweet about it and endorse me on LinkedIn:
The ISC License.