views:

17

answers:

1

Hi

IIS6

-- I have a server on my network which have a network name called Test_Server. It is connected to ISA proxy.

-- I have a server a domain name called Live_Server having the IP Live_IP. It is not connected to any proxy. or suppose to be.

-- off course I open all firewall ports

--I have a WCF REST service, I use HTTPS to connect to it, everything is fine on:-

  • 127.0.0.1:SomePort
  • test_Server:SomePort

--When I connect WCF Rest to any of the following using HTTPS request:-

I get 502 Bad gateway error and the exception status is System.Net.WebExceptionStatus.ProtocolError

  • Live_Server:SomePort
  • Live_IP:SomePort

What is chances??

The following is the web.config of WCF

<system.serviceModel>
  <services>
    <service name="Contracts.WCF_REST">
      <endpoint behaviorConfiguration="webHttp" binding="webHttpBinding" bindingConfiguration="SecureWebHttp" contract="Contracts.IWCF_REST" />
    </service>
  </services>

  <bindings>
    <webHttpBinding>
      <binding name="SecureWebHttp" useDefaultWebProxy="false">
        <security mode="Transport">
          <transport clientCredentialType="None" proxyCredentialType="None"/>
        </security>
      </binding>
    </webHttpBinding>
  </bindings>
  <behaviors>
    <endpointBehaviors>
      <behavior name="webHttp">
        <webHttp/>
      </behavior>
    </endpointBehaviors>
  </behaviors>
</system.serviceModel>
A: 

End of madness

As far as I understand, The client was detecting a proxy and was trying to connect through it. I simply asked .net to stop using any proxy found at the client.

but I am still don't get it, why it woks fine with HTTP and failed to work with HTTPS. HTTPS works only when I stop using the proxy.

Someone have better explanation?

  WebRequest.DefaultWebProxy = null;
Costa