c# - Azure WCF 具有 https wsdl url,但端点 url 位于 http 中

标签 c# azure wcf-binding sharepoint-designer

我正在尝试在 SPD 中访问 Azure WCF。 http wsdl 和端点按预期工作,但 https wsdl 无法处理 https 端点。我打开了 wsdl,只能看到一个 http 端点。

谁能告诉我如何在 wsdlsoap:address 位置中拥有 https 端点?

在 SPD 中使用 ECT 的 https wsdl 和 http 端点,我可以连接到 WCF 服务,但它不会生成 TreeView !

最后它会生成一个错误:“由于内部错误,服务器无法处理请求。有关错误的更多信息,请打开 IncludeExptionDetailsFaults...blah blah blah “我很确定配置文件已经具有 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>

最佳答案

您的 mex 端点是如何在 web.config 的服务部分定义的。应该是这样的,

请注意绑定(bind)必须是“mexHttpsBinding” - (https)

关于c# - Azure WCF 具有 https wsdl url,但端点 url 位于 http 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13874916/

相关文章:

c# - 单独组装中的 WCF 合约 - 如何将其用作端点合约?

c# - 来自 vb.net 中字符串的 CRC-16/ARC

c# - MVVM 光 : About extracting the RelayCommand navigation parameter

c# - Azure Functions 引发启动异常 - 启动操作期间发生主机错误

c# - 客户端在 Windows 服务中找不到 WCF 的端点元素

wcf - 为 wcf 添加服务引用的问题

c# - 如何使用 C# 访问维基百科的数据库?

powershell - 发出 Install-AzureWinRMCertificate 时出现访问被拒绝错误

Azure 上的 Nhibernate HiLo

wcf - 指定与 WCF 客户端一起使用的传出 IP 地址