none
WCF and Fiddler

    Question

  • Hi
    I have a WCF service hosted on IIS.
    On the local machine, I want to run some unit tests which uses my service.
    I have no problem. All tests are passed.
    Now if Fiddler is running, all my tests failed with
      System.Configuration.ConfigurationErrorsException: Error creating the Web Proxy specified in the 'system.net/defaultProxy' configuration section. ---> 
      System.FormatException: The system proxy settings contain an invalid proxy server setting: 'http=127.0.0.1:8888;https=127.0.0.1:8888;'.
    Can anybosy explain me what should I do to fix it?
    Thanks
    Matthieu
    Sunday, October 18, 2009 9:38 PM

Answers

  • Hi, try the following: 
    - Once you have started Fiddler - it changes your proxy settings to enable all requests to go through it - so go to
    Internet Explorer -> Internet Options -> Connections -> LAN Settings -> Advanced button (under Proxy server) and clear the HTTPS 127.0.0.1 and port.

    - Piyush
    Sunday, October 18, 2009 9:59 PM
  • Or you can try setting the proxy used by Fiddler explictly when you start up Fiddler by putting the following in your config file:
      <system.net>
        <defaultProxy>
          <proxy autoDetect ="False" usesystemdefault ="False" proxyaddress ="127.0.0.1:8888"/>
        </defaultProxy>
      </system.net>
    - Piyush
    Sunday, October 18, 2009 10:32 PM

All replies

  • Hi, try the following: 
    - Once you have started Fiddler - it changes your proxy settings to enable all requests to go through it - so go to
    Internet Explorer -> Internet Options -> Connections -> LAN Settings -> Advanced button (under Proxy server) and clear the HTTPS 127.0.0.1 and port.

    - Piyush
    Sunday, October 18, 2009 9:59 PM
  • Or you can try setting the proxy used by Fiddler explictly when you start up Fiddler by putting the following in your config file:
      <system.net>
        <defaultProxy>
          <proxy autoDetect ="False" usesystemdefault ="False" proxyaddress ="127.0.0.1:8888"/>
        </defaultProxy>
      </system.net>
    - Piyush
    Sunday, October 18, 2009 10:32 PM
  • I use the fiddler proxy address and change the binding destination to "ipv4.fiddler" + :port...

    eg-

    <

     

    endpoint address="http://localhost:25723/Services/OrionService.svc" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IOrionService" contract="OrionService.IOrionService" name="WSHttpBinding_IOrionService">

    <

     

    identity>
    <
    dns value="localhost" />
    </
    identity>

    </

     

    endpoint>

    ///////////////////BECOMES

    <endpoint address="http://ipv4.fiddler:25723/Services/OrionService.svc" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IOrionService" contract="OrionService.IOrionService" name="WSHttpBinding_IOrionService">

    <

     

    identity>
    <
    dns value="localhost" />
    </
    identity>

    </

    endpoint>

     

    endpoint>
    endpoint>

     

     

     

     

    Sunday, October 18, 2009 10:38 PM