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

推荐订阅源

罗磊的独立博客
Cisco Talos Blog
Cisco Talos Blog
C
Check Point Blog
博客园_首页
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Martin Fowler
Martin Fowler
Recorded Future
Recorded Future
S
Security @ Cisco Blogs
L
LINUX DO - 最新话题
博客园 - 司徒正美
P
Privacy International News Feed
G
Google Developers Blog
I
Intezer
Hacker News - Newest:
Hacker News - Newest: "LLM"
博客园 - 聂微东
The GitHub Blog
The GitHub Blog
C
Cybersecurity and Infrastructure Security Agency CISA
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Scott Helme
Scott Helme
K
Kaspersky official blog
I
InfoQ
Y
Y Combinator Blog
T
The Blog of Author Tim Ferriss
Webroot Blog
Webroot Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
大猫的无限游戏
大猫的无限游戏
D
Docker
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
W
WeLiveSecurity
Microsoft Azure Blog
Microsoft Azure Blog
Spread Privacy
Spread Privacy
量子位
H
Hacker News: Front Page
Simon Willison's Weblog
Simon Willison's Weblog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
SecWiki News
SecWiki News
S
Security Affairs
Latest news
Latest news
人人都是产品经理
人人都是产品经理
C
CERT Recently Published Vulnerability Notes
S
Security Archives - TechRepublic
V
Visual Studio Blog
T
Troy Hunt's Blog
S
Secure Thoughts
F
Fortinet All Blogs
V
V2EX
The Register - Security
The Register - Security
J
Java Code Geeks
MongoDB | Blog
MongoDB | Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO

博客园 - Eugene Leung

The AndroidManifest.xml File Make Web Not War 不使网站成为战场 地理考考你 这几个问题我来答 邓亚萍博士学位论文 英文题目 DartTrainer 免费下载 从MSN Messenger的Hand Writing开始 今天闲暇的时候画了两幅画 fyiReporting RDLC Report Custom Code - Eugene Leung 骑 自行车 从公司 到家 - Eugene Leung 猴面包树果 baobab tree 继承Form中的DevExpress控件不能打开编辑器Designer - Eugene Leung LJP Little John PalmOS 1.0 Release 最新版 (RC9后的正式版) 当你老了 --叶芝 我的语文备忘 - Eugene Leung 新开始做wpf,随便写点经验 - Eugene Leung 初中英语课本里隐藏着的惊人秘密(转载) - Eugene Leung 如果不出意外,我每周都会去工大打球 - Eugene Leung 关于 韩国 申明 豆浆 和 端午 是其国家创造或历史的 看法 - Eugene Leung
开始进入SilverLight
Eugene Leung · 2009-03-25 · via 博客园 - Eugene Leung

这些天开始学习SilverLight, 入门开始,是从如何连接WCF和SilverLight开始的,相关的内容几乎相关于配置,遇到了很多问题。

1. 关于SilverLight和WCF的问题

     SilverLight和WCF Service不在一个Domain里面,特别是在开发环境的时候,会遇到下面两个问题,

          a. 使用Development Server的时候怎么才能放置clientAccessPolicy到root?

          b. 如何配置SilverLight中引用WCF Service

     对于问题a, 我没有直接面对,而是用了跳过的方法,如何跳过?我在WebApplication内引用了wcf service,再通过service.svc暴露出这个service,等于使用Development Server来host这个WCF service,对于silverlight来说就不是跨域的访问了。

     对于问题b,我选择了不使用ServiceReference.Config来配置,而是在SilverLight中创建Client的时候通过使用HtmlBridge来得到承载页的信息,这样就可以灵活的配置,不论以后是不是要换server,iis也好,还是development server也好,都可以支持。

2. 关于IIS的问题

这里需要多提一句,其实Framework 3.0/3.5都是基于2.0核心开发的一系列扩展,所以对于IIS来说,在Application Pool中,你是看不到3.0/3.5的字样,但是实际上你还是需要安装Framework3.5,因为你的程序需要这些运行库。

具体细节请下载我的测试工程内有一些注释。

https://files.cnblogs.com/Eugene/TestSilverLight.zip

工程中有三个项目

1. WCF service

2. Web Application

3. SilverLight Application

需要注意的是以下几个文件

      1. Page.xaml.cs [Project 3]

      2. DataService.svc [Project 2]

      3. ServiceReferences.ClientConfig [Project 3]

使用方法

pre:安装好Framework3.5sp1, SilverLight SDK

1. Unzip to anywhere

2. Double click [TestSilverlight.sln]

3. Press F5