0

I need to set reverse proxy for my development purpose. I can find many blogs on how to do it for IIS or apache. But that will be used during deployment. During development I am using Visual studio 2012. How can I set reverse proxy for visual studio development server? Or can I simply tell visual studio to use iis?

user2692032
  • 771
  • 7
  • 26

1 Answers1

0

I just did this using Fiddler2 (see Fiddler download page). It says that Fiddler2 is built for .NET 2, but still I'm using a more recent version of .NET.

After installing Fiddler, I followed the instructions for creating a FiddlerScript rule to use Fiddler as a reverse proxy. To be clear, I did NOT create a DWORD in the registry or follow any of the other instructions... I only followed what's stated under "Write a FiddlerScript Rule".

When it came to adding the line to CustomRules.js (step 5) my line looked like this:

if (oSession.host.toLowerCase() == "sto-lt-eov:8888") oSession.host = "localhost:52044";

The sto-lt-eov-value I got from opening up Command Prompt and typing ipconfig /all. Your value for this will be under the listing Host Name, the very first line in the output you get. Make sure you type it in lowercase in the rule - at first I just copied it and pasted, which never caused a match in the .toLowerCase()-method.

My IIS (development server) runs on port 52044 but that changes periodically, so the downside is that I'll have to maintain that part of the rule as the port changes.

The result of this was that I am able to access the website running on IIS Development Server using an iPad running on the same WiFi.

PS. I did this with Squid before, running on a blog post from Ashley Angell mentioned in another StackOverflow-question but when I came back to this issue Fiddler seemed like a more user friendly option. Squid is absolutely riddled with options and in my opinion has less accessible feedback than Fiddler does. I still realize the tremendous power that Squid possesses... I just needed the simple solution :)

Community
  • 1
  • 1
erlingormar
  • 451
  • 2
  • 11