开发者

RIA Services and SSL by configuration?

开发者 https://www.devze.com 2023-01-13 05:05 出处:网络
According to this I 开发者_C百科need to set an attribute in code to get SSL encryption for my RIA service calls. Is there no way to do this with a configuration file?

According to this I 开发者_C百科need to set an attribute in code to get SSL encryption for my RIA service calls. Is there no way to do this with a configuration file?

(I currently use Visual Studio 2008 and Silverlight 3.)


I'm not sure about VS2008 + Silverlight 3 but with VS2010 and Silverlight 4 you can set it through web.config.

You can use the behavior.serviceMetadata tag to set https enabled.

e.g.

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

You then set the security mode for any bindings, e.g.

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

精彩评论

暂无评论...
验证码 换一张
取 消