惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
I
InfoQ
Engineering at Meta
Engineering at Meta
D
DataBreaches.Net
L
LangChain Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Recent Announcements
Recent Announcements
GbyAI
GbyAI
爱范儿
爱范儿
Microsoft Security Blog
Microsoft Security Blog
腾讯CDC
美团技术团队
罗磊的独立博客
Microsoft Azure Blog
Microsoft Azure Blog
WordPress大学
WordPress大学
T
The Blog of Author Tim Ferriss
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
雷峰网
雷峰网
M
MIT News - Artificial intelligence
D
Docker
MongoDB | Blog
MongoDB | Blog
F
Fortinet All Blogs
博客园 - 叶小钗

博客园 - dudulang971

WCF SVCUTIL自动生成WCF客户端代理及配置文件命令 Windows Server 2008 组策略 屏蔽移动设备 IE开启ActiveX控件 VMWare ESX 错误(1)-虚拟机中启动虚拟机 An add-on for this website failed to run. Check the security settings in Internet options for potential conflicts.错误 XamlReader使用注意点-命名空间 Silverlight WebClient下载 Silverlight WebClient上传 Asp.net MVC + JQuery调用Ajax(2) - dudulang971 Asp.net MVC + JQuery调用Ajax(1) Jquery -> Css函数 Jquery -> 常用数组函数 Jquery -> Map映射 Jquery -> 数组迭代和筛选 - dudulang971 Asp.Net Session会话状态回顾 - dudulang971 - 博客园 vs小工具之ILDASM asp.net部署出错(targetFramework无法识别) 上海世博会还有1天就开幕了。给自己放个大假 vs开发小技巧(1)之Debug
Silverlight 跨域访问 - dudulang971 - 博客园
dudulang971 · 2011-01-30 · via 博客园 - dudulang971

Silverlight提供了两种方式实现不同域之间的访问。分别是

(1)Silverlight 客户端访问策略文件 (clientaccesspolicy.xml), 

<?xml version="1.0" encoding="utf-8"?>

  <access-policy>
<cross-domain-access>
<policy>
<allow-from http-request-headers="SOAPAction">
<domain uri="*"/>
</allow-from>
<grant-to>
<resource path="/Resource/" include-subpaths="true"/>
</grant-to>
</policy>
<policy >
<allow-from http-methods="*">
<domain uri="www.XX.com"/>
</allow-from>
<grant-to>
<resource path="/Resource/" include-subpaths="true"/>
</grant-to>
</policy>
</cross-domain-access>
</access-policy>

       

跨域策略文件格式

    <?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM
"http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="*"/ headers="SOAPAction"
secure="true">
</cross-domain-policy>

需要特别注意的是clientaccesspolicy.xml需要放在服务器的根目录下。