【问题标题】:Publish a non https endpoint for WCF - Azure为 WCF 发布非 https 终结点 - Azure
【发布时间】:2013-04-01 13:30:11
【问题描述】:

如何为 WCF 添加非 https 端点?我的 WCF 是 Azure 项目中的 Web 角色。

我目前的终点是:

<bindings>
      <basicHttpBinding>
        <binding name="SecureBasic" proxyAddress="http://localhost:80">
          <security mode="Transport">
            <transport clientCredentialType="None"/>
          </security>
        </binding>
      </basicHttpBinding>
    </bindings>


    <services>
      <service name="WebRoleUploadImages.UploadImages">
        <host>
          <baseAddresses>           
            <add baseAddress="http://localhost:80"/>
          </baseAddresses>
        </host>

        <endpoint address="WCFSecure" binding="basicHttpBinding" bindingConfiguration="SecureBasic"
          name="SecureHTTPSendpoint" contract="WebRoleUploadImages.IUploadImages"> </endpoint>       

      </service>
    </services>

问题是我还没有 SSL 证书,所以我无法在没有 http 端点的情况下测试我的应用程序

【问题讨论】:

  • 您是否考虑过使用self-signed certificate 进行测试?根据您的应用程序/用例,在使用和不使用 SSL 的情况下,事情的行为可能会完全不同,这使得测试变得毫无价值。
  • 我确实使用了自签名证书,但它说:'在myserver/UploadImages.svc/WCFSecure 上没有可以接受消息的端点监听。这通常是由不正确的地址或 SOAP 操作引起的。有关详细信息,请参阅 InnerException(如果存在)。'

标签: c# wcf azure


【解决方案1】:

这不是 azure 限制,而是 WCF 限制。基本身份验证以纯文本形式发送密码,并且在没有 SSL 认证的情况下这样做是一个非常糟糕的主意。如果只是为了测试,你可以通过指定来作弊

<security mode="TransportCredentialOnly">

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-03-09
    • 2012-08-09
    • 1970-01-01
    • 2014-02-20
    • 1970-01-01
    • 1970-01-01
    • 2017-05-14
    • 2012-07-29
    相关资源
    最近更新 更多