开发者

RIA Services and SSL by configuration?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜