Why my WSDL still shows basic http binding with the location value of http?

前端 未结 2 994
野性不改
野性不改 2021-01-05 10:27

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



        
相关标签:
2条回答
  • 2021-01-05 11:06

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

     <serviceBehaviors>
       <behavior>
         <serviceMetadata httpsGetEnabled="true" />
         <serviceDebug includeExceptionDetailInFaults="false"/>
     </behavior>
    
    0 讨论(0)
  • 2021-01-05 11:30

    First of all, you should realize that the URL in the service element of the WSDL is only a hint. Your clients should not be depending on this being the correct address of the service.

    Second, realize that if your service is hosted in IIS, then it is IIS which determines the address to place in that element, based on your bindings in IIS. I suspect that you have both HTTP and HTTPS enabled on the site hosting the service. You can usually switch this to just HTTPS by setting the "Require SSL" property on the SSL page in IIS Manager.

    0 讨论(0)
提交回复
热议问题