开发者

Call a WCF from only my silverlight application

开发者 https://www.devze.com 2023-03-29 06:40 出处:网络
I have a WCF. I have a silverlight application. I do not want anyone 开发者_JS百科to be able to call the WCF except the Silverlight application.

I have a WCF. I have a silverlight application.

I do not want anyone 开发者_JS百科to be able to call the WCF except the Silverlight application. I do not want to install any certificates on the client. I do not want to hit any databases.

What would typically be the best way to do something like this?


You can address this using a cross domain policy file. Silverlight cannot connect to WCF services hosted on secondary domains without the implementation of this policy file.

Here are two links to get you in the right direction http://msdn.microsoft.com/en-us/library/cc197955%28v=vs.95%29.aspx

Tim Heuer has a good writeup on the implementation of this file as well.

http://timheuer.com/blog/archive/2008/04/06/silverlight-cross-domain-policy-file-snippet-intellisense.aspx

To prevent a WCF services from being accessed by other applications you will need to implement authentication of some sort Here is a related post

0

精彩评论

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