簡體   English   中英

Azure WCF具有https wsdl URL,但終結點URL在http中

[英]Azure WCF has https wsdl url but endpoint url is in http

我正在嘗試在SPD中訪問Azure WCF。 http wsdl和端點可以正常工作,但是https wsdl無法處理https端點。 我打開了wsdl,只能看到一個http端點。

誰能告訴我如何在wsdl soap:address位置使用https端點?

使用SPD中用於ECT的https wsdl和http端點,我可以連接到WCF服務,但它不會生成樹視圖!

最后,它生成一個錯誤:“ 服務器由於內部錯誤而無法處理該請求。有關該錯誤的更多信息,請打開IncludeExptionDetailsFaults ...等等等等。我很確定文件已經具有serviceDebug includeExceptionDetailInFaults =“ true”行為

配置

 <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>

如何在web.config的services部分中定義您的mex端點。 應該是這樣的

請注意,綁定必須是“ mexHttpsBinding”-(https)

添加的mex綁定和端點現在在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>

現在剩下的問題是,當我將SPO BCS連接到服務時,它會產生我上面提到的錯誤。 即使IncludeExceptionDetailInFaults在配置中設置為true

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM