代码之家  ›  专栏  ›  技术社区  ›  Stefan Egli

RIA服务和SSL配置?

  •  1
  • Stefan Egli  · 技术社区  · 15 年前

    根据 this 我需要在代码中设置一个属性,以便为RIA服务调用获取SSL加密。对配置文件没有办法做到这一点吗?

    (我当前使用的是Visual Studio 2008和Silverlight 3。)

    1 回复  |  直到 9 年前
        1
  •  0
  •   Fermin    15 年前

    我不确定VS2008+silverlight3,但有了VS2010和silverlight4,您可以设置它通过web.config文件.

    你可以使用 behavior.serviceMetadata 标记以设置启用https。

    例如

    <behavior name="ReportServiceBehavior">
      <serviceMetadata httpsGetEnabled="true" />
    </behavior>
    

    然后为任何绑定设置安全模式,例如。

    <webHttpBinding>
      <binding name="webHttpBindingConf">
        <security mode="Transport">
          <transport clientCredentialType="None"/>
        </security>
      </binding>
    </webHttpBinding>