SilverLight4调用WCF简单示例
    





            
项目结构图如下,没什么东西的。

 

clientaccesspolicy.xml这个文件是Silverlight访问Wcf的安全策略文件。要放在根目录下哦。

这是里面的内容。

代码
1 <?xml version="1.0" encoding="utf-8"?>
2  <access-policy>
3 <cross-domain-access>
4 <policy>
5 <allow-from http-request-headers="*">
6 <domain uri="*"/>
7 </allow-from>
8 <grant-to>
9 <resource path="/" include-subpaths="true"/>
10 </grant-to>
11 </policy>
12 </cross-domain-access>
13  </access-policy>

 

效果如下图:

SilverLight4调用WCF简单示例
    





            
项目结构图如下,没什么东西的。

相关文章:

  • 2022-12-23
  • 2021-05-15
  • 2022-01-05
  • 2022-12-23
  • 2022-12-23
  • 2021-04-08
  • 2021-05-22
  • 2021-12-12
猜你喜欢
  • 2021-08-30
  • 2021-08-16
  • 2021-11-01
  • 2022-02-03
  • 2021-05-27
  • 2021-10-31
相关资源
相似解决方案