[英]Silverlight Slideshow + WCF
I downloaded this Silverlight project in order to use it on my asp webproject . 我下载了这个Silverlight项目,以便在我的ASP Web项目中使用它。
http://designwithsilverlight.com/?p=162 http://designwithsilverlight.com/?p=162
The slide show works fine inside its project with WCF methode that returns the img url from my database . 幻灯片显示在其项目中使用WCF方法可以正常工作,该方法从我的数据库返回img url。
but when I add the XAP file and the html test page to my web project , no img loaded . 但是当我将XAP文件和html测试页添加到我的Web项目中时,没有加载img。
any idea ? 任何想法 ?
You achieve to cross-domain policy 您实现跨域策略
you must create a xml file with this name: clientaccesspolicy.xml, and this content: 您必须使用以下名称创建一个xml文件:clientaccesspolicy.xml,内容如下:
<?xml version="1.0" encoding="utf-8" ?>
<access-policy>
<cross-domain-access>
<policy>
<allow-from http-request-headers="SOAPAction,Content-Type">
<domain uri="*" />
</allow-from>
<grant-to>
<resource path="/" include-subpaths="true"/>
</grant-to>
</policy>
</cross-domain-access>
</access-policy>
then put this file to root of your web server or your project 然后将此文件放到Web服务器或项目的根目录
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.