简体   繁体   中英

Azure WCF has https wsdl url but endpoint url is in http

I'm trying to access Azure WCF in SPD. The http wsdl and endpoint works as expected, but the https wsdl cannot handle a https endpoint. I opened up the wsdl and can see only a http endpoint.

Can anyone tell me how to have a https endpoint in wsdl soap:address location?

using the https wsdl and http endpoint in SPD for ECT I can connect to the WCF service but it doesn't generate a tree view!

At the end it generates an error: " The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExptionDetailsFaults... blah blah blah " which I'm pretty sure that the config file has serviceDebug includeExceptionDetailInFaults="true" behavior already

config

 <system.web>
    <customErrors mode="Off" />
    <compilation debug="true" targetFramework="4.0">
      <assemblies>
        <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
      </assemblies>
    </compilation>
  </system.web>
  <system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <serviceMetadata httpsGetEnabled="true" httpGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="true" />
          <useRequestHeadersForMetadataAddress>
            <defaultPorts>
              <add scheme="http" port="80" />
              <add scheme="https" port="443" />
            </defaultPorts>
          </useRequestHeadersForMetadataAddress>
        </behavior>

      </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
  </system.serviceModel>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true" />
    <directoryBrowse enabled="true" />
  </system.webServer>

csdef

<?xml version="1.0" encoding="utf-8"?>
<ServiceDefinition name="SPO_LOB" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2012-10.1.8">
  <WebRole name="SPO_LOB" vmsize="Small">
    <Sites>
      <Site name="Web">
        <Bindings>
          <Binding name="Endpoint1" endpointName="Endpoint1" />
          <Binding name="HttpsIn" endpointName="HttpsIn" />
        </Bindings>
      </Site>
    </Sites>
    <Certificates>
      <Certificate name="certsvc" storeLocation="LocalMachine"
          storeName="CA" />
    </Certificates>
    <Endpoints>
      <InputEndpoint name="Endpoint1" protocol="http" port="80" />
      <InputEndpoint name="HttpsIn" protocol="https" port="443" certificate="democloudsvc1" />
    </Endpoints>
    <Imports>
      <Import moduleName="Diagnostics" />
      <Import moduleName="RemoteAccess" />
      <Import moduleName="RemoteForwarder" />
    </Imports>
    <LocalResources>
      <LocalStorage name="SPO_LOB.svclog" sizeInMB="1000" cleanOnRoleRecycle="false" />
    </LocalResources>
  </WebRole>
</ServiceDefinition>

How is your mex endpoint defined in services section of web.config. it should be like this,

Please note the binding has to be "mexHttpsBinding" - (https)

added mex binding and endpoint now is in https

<bindings>
      <basicHttpBinding>
        <binding name="SecureBasic" proxyAddress="http://localhost:80">
          <security mode="Transport">
            <transport clientCredentialType="None"/>
          </security>
        </binding>
      </basicHttpBinding>
    </bindings>
    <services>
      <service name="SPO_LOB.Service1" behaviorConfiguration="SVCbehavior">
        <host>
          <baseAddresses>
            <add baseAddress="https://localhost:443"/>
          </baseAddresses>
        </host>
        <endpoint binding="basicHttpBinding" bindingConfiguration="SecureBasic" name="basicHttpSecure" contract="SPO_LOB.IService1" />
        <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
      </service>
    </services>
    <behaviors>

The remaining problem now is when I connect SPO BCS to the service it generates the error I mentioned above. Even though IncludeExceptionDetailInFaults is set to true in config

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM