سؤال

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!!

هل كانت مفيدة؟

المحلول

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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top