Why is my WSDL still showing a basic HTTP binding with an http location value?

I have enabled https binding, but my WSDL has an http soap address. Any ideas why? Thanks!

<wsdl:service name="XXXX"><wsdl:port name="BasicHttpBinding_XXXXService" binding="i0:BasicHttpBinding_XXXService"> <soap:address location="http://dev-soa-app/XXXX/XXXX/XXXService.svc"/></wsdl:port> </wsdl:service> 

Here is my web.config file:

 <?xml version="1.0"?> <configuration> <system.web> <customErrors mode="Off"/> <compilation debug="true" targetFramework="4.0" /> </system.web> <configProtectedData> <providers> <add name="ConnStrings" type="System.Configuration.RsaProtectedConfigurationProvider, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" keyContainerName="ConnStrings" cspProviderName="" useMachineContainer="true" useOAEP="false"/> </providers> </configProtectedData> <connectionStrings configSource="ConnStrings\ConnStrings.config"/> <system.serviceModel> <services> <service name="XXXXService"> <!-- Use a bindingNamespace to eliminate tempuri.org --> <endpoint address="" name="XXXXService" binding ="wsHttpBinding" bindingConfiguration="TransportSecurity" bindingNamespace="WF.CT2.WebServices.XXXXService" contract="WF.CT2.WebServices.XXXXService.SAMLService" /> <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/> </service> </services> <bindings> <wsHttpBinding> <binding name="TransportSecurity"> <security mode="Transport"> <transport clientCredentialType="None"/> </security> </binding> </wsHttpBinding> </bindings> <behaviors> <serviceBehaviors> <behavior> <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment --> <serviceMetadata httpsGetEnabled="true" httpGetEnabled ="false" /> <!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information --> <serviceDebug includeExceptionDetailInFaults="false"/> </behavior> </serviceBehaviors> </behaviors> <serviceHostingEnvironment multipleSiteBindingsEnabled="true" /> </system.serviceModel> <system.webServer> <modules runAllManagedModulesForAllRequests="true"/> </system.webServer> </configuration> 
+6
source share
2 answers

First of all, you should understand that the URL in the WSDL service element is just a hint. Your customers should not depend on the fact that this is the correct service address.

Secondly, understand that if your service is hosted in IIS, then IIS determines the address to host in this element based on your bindings in IIS. I suspect that the site hosting the service has both HTTP and HTTPS. You can usually switch this to HTTPS by setting the "Require SSL" property on the SSL page in IIS Manager.

+8
source

Remove httpGetEnabled = "false" from your Web.Config and save httpsGetEnabled = "true" as it is (see below).

  <serviceBehaviors> <behavior> <serviceMetadata httpsGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="false"/> </behavior> 
0
source

All Articles