문제

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