0

I'm trying to setup my Web service client to use fiddler proxy by setting it in the webhttpbinding configuration file as follows:

<bindings>
  <webHttpBinding>
    <binding name="RestBinding" proxyAddress="http://localhost:8888"  
         useDefaultWebProxy="false">

    </binding>
  </webHttpBinding>
</bindings>
<client>
   <endpoint address="http://localhost:2172/RestServiceImpl.svc" 
       binding="webHttpBinding"  behaviorConfiguration="RestService" 
       bindingConfiguration="RestBinding" 
       contract="IWS.IRestServiceImpl" name="Rest"/>
</client>

This doesn't seem to work. I don't see anything logged in fiddler when calling the webservice from the client. I know the call is being made because I get a response back from the service.

I can't seem to figure out what I'm doing wrong.

Any help is appreciated!

Thanks!!

ptn77
  • 567
  • 3
  • 8
  • 23

1 Answers1

0

The .NET Framework does not send requests for "localhost" to any proxy, including Fiddler. To workaround this, try to use your machine name instead as the endpoint address (e.g. http://mymachine:2172/RestServiceImpl.svc).

Also, take a look on Using Fiddler with IIS7 Express

Community
  • 1
  • 1
evgenyl
  • 7,837
  • 2
  • 27
  • 32
  • Thank you for taking the time to read my post. I tried changing it to use computer name and ip, but both are giving me the error "ErrorCode: 10061. No connection could not be made because the target machine actively refused it" I have a feeling this is now a permissions issue on my windows 7 machine. Do you know what I should do to enable access to my webservice? – ptn77 May 13 '13 at 15:30
  • I updated my hosts file and was able to get this working. Changing it to use the computer name did the trick! Thank you so much! – ptn77 May 13 '13 at 17:17