none
WCF service is not getting callled when proxy server for LAN enabled RRS feed

  • Question

  • I tried a simple REST service with JSON using WCF, that works fine initially and when i go to Internet Option -> Connections -> LAN settings -> Proxy Server settings -> and I set the Adress and Port at this scenarion servise is not returning JSON output. but this works in IE and it's not working in chrome and firefox.

    I don't know why it's not working when proxy is enabled. and this is working if we check the Bypass proxy server for local server

    If I want the proxy address dynamically how can i set the values below I hard-coded in system.net but that is not working 

    App.config

    <configuration>
        <system.net>
            <defaultProxy useDefaultCredentials="true">
             <proxy usesystemdefault="False" proxyaddress="http://192.156.23.123:8080" bypassonlocal="True"/>
            </defaultProxy>
        </system.net>
        <system.serviceModel>
           <services>
               <service name = "abc">
                 <host>
                   <baseAddress>
                       <add baseAdress="http://localhost:8712"/>
                   </baseAddress>
                 </host>
                 <endpoint adress = "" behaviorConfiguration="rest"binding="webHttpBinding" contract="WCFservicelibrary1.Iservice1">
                  <identity>
                   <dns value = "localhost"/>
                  </identity>
                 </endpoint>
                 <enspoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
                 </service>
           </services>
           <behaviors>
              <serviceBehaviors>
                <behavior>
                  <serviceMetadata httpGetEnabled="True"/>
                  <serviceDebug includeExceptionDetailInFaults="true"/>
                </behavior>
              </serviceBehaviors>
              <endpointBehaviors>
               <behavior name = "rest">
                  <webHttp/>
               </behavior>
              </endpointBehaviors>
           </behaviors>
        </system.serviceModel>
    </<configuration>




    • Edited by GUN123456 Tuesday, February 25, 2014 2:35 AM
    Tuesday, February 25, 2014 2:24 AM

Answers