[玩转Silverlight]第四回:基础篇,在Silverlight中使用基于WCF的REST服务(下)
2009-02-20 11:56:53 来源:WEB开发网
- 配置web.config
<system.serviceModel>
<services>
<service name="Anytao.SLScenario.Service.PostService">
<endpoint address="" binding="webHttpBinding" contract="Anytao.SLScenario.Service.IPostService" behaviorConfiguration="postbehavior"/>
</service>
</services>
<bindings>
<webHttpBinding>
<binding name="secure">
<security mode="None">
</security>
</binding>
</webHttpBinding>
</bindings>
<behaviors>
<endpointBehaviors>
<behavior name="postbehavior">
<webHttp/>
</behavior>
</endpointBehaviors>
</behaviors>
</system.serviceModel>
- 添加跨域策略文件clientaccesspolicy.xml
<?xml version="1.0" encoding="utf-8"?>
<access-policy>
<cross-domain-access>
<policy>
<allow-from http-request-headers="*">
<domain uri="*"/>
</allow-from>
<grant-to>
<resource path="/" include-subpaths="true"/>
</grant-to>
</policy>
</cross-domain-access>
</access-policy>
Tags:Silverlight 第四回 基础
编辑录入:爽爽 [复制链接] [打 印]- ››silverlight全屏显示图片
- ››Silverlight MVVM 模式(一) 切近实战
- ››Silverlight for Windows Phone 7开发系列(1):...
- ››Silverlight for Windows Phone 7开发系列(2):...
- ››Silverlight for Windows Phone 7开发系列(3):...
- ››Silverlight for Windows Phone 7开发系列(4):...
- ››基础推广如何完成网站的优化升级(一)
- ››Silverlight for Symbian
- ››Silverlight3系列(四)数据绑定 Data Binding 1
- ››silverlight2 游戏 1 你能坚持多少秒
- ››Silverlight开发实践--PicZoomShow
- ››Silverlight自定义控件开发 - 令人懊恼的OnApplyT...
更多精彩
赞助商链接