I'm running a C# web service in IIS6 and trying to get it to work over SSL. When doing a tcpdump it shows the initial call as https but every other call over http. My SSL certificate is self signed and https works fine in my web browser. I'm using PHP SoapClient for the client.
Does anyone know what would cause this?
In the wsdl the address location is set to http. Should this be https? How do I change it?
<wsdl:service name="Service">
<wsdl:port name="BasicHttpBinding_Service" binding="i0:BasicHttpBinding_Service">
<soap:address location="http://example.com/Service.svc"/>
</wsdl:port>
</wsdl:service>
Create and configure a console app project for hosting a WCF service. Add code to host the WCF service. Update the configuration file. Start the WCF service and verify it's running.
You must configure your service to use HTTPS:
<bindings>
<basicHttpBinding>
<binding name="https">
<security mode="Transport" />
</binding>
</basicHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="metadata">
<serviceMetadata httpsGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service name="..." behaviorConfiguration="metadata">
<endpoint address="..." contract="..." binding="basicHttpBinding"
bindingConfiguration="https" />
</service>
</services>
This will allow calling your service only over HTTPS because there is no unsecured endpoint exposed. WSDL will also be accessible only over HTTPS because HTTP GET is not enabled.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With