vgg3-a
Last Updated: February 25, 2016
·
2.083K
· icflorescu
Icflorescu

Test IIS Express web applications on remote devices

Picture

TL;DR

npm i -g iisexpress-proxy
iisexpress-proxy 51996 to 3000

The story

Are you a .NET developer building mobile web application? Have you ever been frustrated by the fact that there's no easy way to enable IIS Express to accept connections from remote devices?...

Well, join the club. If you're patient enough to dig through the various links coming up on the search above, you'll see that it is possible, but not really straightforward.

However, there's now a much simpler solution available: you can proxy the http traffic to IIS Express using this little Node.js command-line tool I've put together. It's as simple as typing this in the command prompt:

iisexpress-proxy 51996 to 3000

It will show you something like:

IIS Express Proxy 0.1.2
Proxying localhost:51996 to:
- Wi-Fi: 192.168.0.102:3000
- VMware Network Adapter VMnet1: 192.168.192.1:3000
- VMware Network Adapter VMnet8: 192.168.245.1:3000
Listening... [ press Control-C to exit ]

Then you can simply point your tablet or mobile phone at http://192.168.0.102:3000.

Motivation

8 years ago I was doing lots of C#/.NET development. Then I switched to Ruby/RoR, then to Node.js, which I've been using almost exclusively for 3 years. During these last 3 years I've become accustomed to a rich, flourishing, cutting-edge development workflow that just works.

Now I am contemplating the opportunity of working on a large Angujar.js/.NET application. None of those is my technology of choice, but they do seem to be favored by the corporate environment, and after all, that's where the money is.

While Microsoft is slowly reinventing itself, I've come to realize their ecosystem and philosophy are still far from web-developer friendly. For instance, Visual Studio might be a great IDE for building desktop applications, but to be honest I find it rather counter-productive for web development.

However, you can alleviate the pain by borrowing the right tools from the open-source world and especially from the rich Node.js ecosystem.

Sharing is caring

If you like iisexpress-proxy, please don't hesitate to tweet about it!

Say Thanks
Respond

1 Response
Add your response

25252
None

This has been working great for me. I've run into one issue though and not sure how to get around it.

I use Windows via Parallels on a Macbook. Basically I have a server side application running in Windows via IIS Express and Visual Studio, and the app is being built on the OSX side. When testing with the iOS simulator it works over my LAN, but when I try to access the address from an actual device it cannot connect and I'm assuming it can't see my windows VM.

When I set the proxy, the only address it gives me is Local Area Connection. There is no Wifi, VMWare etc. like the example above. Any ideas?

Thanks for a very easy solution.

over 1 year ago ·