Troubleshoot VS2013 WebApi with Fiddler

If you run client code in VS to test against a webapi in VS2013’s IIS Express, Fiddler does not see the traffic, because you are using “http://localhost:8080”.

The work around is to use “http://machinename:8080”.  But that won’t work with IIS Express; you can the error 400 saying invalid hostname.

So the work around is to modify the applicationhost file. 

  1. Find the IIS Express in your system tray. 
  2. Right click on it and select ‘Show All Applications’
  3. Select your site name.  Don’t click on the URL.
  4. Click on the “Config:” link.
  5. image
  6. Add a binding for your machine hostname:
  7. Restart VS 2013 (run as admin).

Note:

One can “add urlacl” to avoid the need to run VS2013 in admin.

 

Reference:

http://stackoverflow.com/questions/5433786/configure-iis-express-for-external-access-to-vs2010-project

http://msdn.microsoft.com/en-us/library/windows/desktop/cc307223(v=vs.85).aspx

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s