随笔:16 文章:2 评论:86 引用:0
博客园 首页 发新随笔
发新文章 联系 订阅订阅管理

2007年6月6日

今天试用了Orcas的Silverlight开发,按QuickStart的说明,很顺利的学完了第一个Sample:Event Handling。
只是想不明白Silverlight通过什么方式和服务器端的托管代码进行交互。
开始以为是Ajax,但在IE里打开HTML源码,找不到任何Ajax的痕迹。
后来开始猜测Silverlight也许是把托管dll下载到本地执行。
用工具跟踪http请求后,果然如此。

原来Silverlight按xaml里指定的类库名,下载相应的 .dll和 .pdb文件到客户端,在本地环境加载后执行。
这样看来,下载完所有库后,Silverlight运行原理就和Winform是一样的了。

也许是同样的原因,Silverlight项目编译的文件都放在一个叫 ClientBin 的目录下,意思就是说这个目录的文件都是要下载到客户端运行的。


posted @ 2007-06-06 18:44 Addie 阅读(1719) 评论(4) 编辑

2007年6月5日

原以为 Silverlight 会支持 Windows Media Server 所有流特性,就象 Media Player 那样,支持 udp、rtsp、mms、协议播转等等。
但经过一段时间的测试后发现:Silverlight似乎只支持http协议下的 progressive download 。

这确实令人失望,也让人费解,尤其是SDK文档中明确提到:

Supported Protocols

The following web protocols are supported.

  • http
  • https
  • mms

Streaming

In addition to progressive downloads, MediaElement supports live and on-demand streaming from a Windows Media Server. If the file URI specifies the mms protocol, the MediaElement attempts to stream the file first. If the file can't be streamed, it downloads the file progressively. If the file URI specifies another protocol, such as http or https, the MediaElement attempts a progressive download first. If that fails, the MediaElement attempts to stream the file.

不知园子里有没有朋友遇到同样的问题。

posted @ 2007-06-05 13:49 Addie 阅读(3382) 评论(11) 编辑

2005年4月30日

1、StreamReader sr = new StreamReader(fileName, HttpContext.Current.Response.ContentEncoding);

2、StreamReader sr = new StreamReader(fileName, Encoding.GetEncoding(HttpContext.Current.Response.ContentEncoding.BodyName));

在我把 Server 2003 升级到SP1之前,使用第一方式是没有任何问题的。
升级到SP1之后,第一种方式报Not Implement的错误。
经测试,第二种方式可以正常运行。

升级前咨询过微软的系统工程师、IIS工程师,他们都说打SP1不会对现有的编码有任何影响。
在此BS他们。
posted @ 2005-04-30 10:21 Addie 阅读(1312) 评论(1) 编辑

2004年12月5日

  public static bool IsValidMobileNo(string MobileNo)
  {
   const string regPattern = @"^(130|131|132|133|134|135|136|137|138|139)\d{8}$";
   return Regex.IsMatch(MobileNo, regPattern);
  }
posted @ 2004-12-05 13:50 Addie 阅读(6776) 评论(8) 编辑

2004年11月29日

昨天是儿子七周岁生日。

儿子历来很重视过生日的感觉,每次都是两三天前就开始酝酿着买生日蛋糕,这一次也不例外。
一大早,我和老婆陪着他先去一家奥迪四驱专卖店,买了一条双轨赛道和一辆赛车,这是早就答应他的生日礼物。赛车的名字很酷:“异形”。

买完礼物后,已经快中午12点了,儿子

posted @ 2004-11-29 13:47 Addie 阅读(397) 评论(1) 编辑

2004年11月3日

摘要: 刚才试了一下,只要打开这个页面:http://licenseserver.windowsmedia.com/v2revocation.asp 就可以更新License Server的Revocation List(DRM Component撤回清单/废除清单?)。页面里内嵌一段JavaScript,内容详见页尾。所以,如果你有幸从微软申请到一份Client DRM Component,请...阅读全文
posted @ 2004-11-03 23:27 Addie 阅读(1168) 评论(1) 编辑

2004年11月2日

摘要: 下面内容摘自 Windows Media Rights Manager 9 Series SDK 文档Refusing Licenses to Excluded DRM ComponentsTo ensure that licenses are not issued to player applications using DRM components known to be damaged or...阅读全文
posted @ 2004-11-02 15:01 Addie 阅读(1675) 评论(2) 编辑

2004年10月29日

摘要: 周一下载了Directx 9.0c October 2004 版,安装后发现这个版本未提供DShow的相关资料及Sample,很是好奇,难道MS要放弃DShow了?不太可能。后来又下载了它的一个补充版,October 2004 Extras,原来DShow的东西被放这个Extras里了,而且资料和Sample都有一些变化,于是用VC7试着编译了一些Sample,惊喜地发现,以前用VC7无法编译的一...阅读全文
posted @ 2004-10-29 23:55 Addie 阅读(3147) 评论(23) 编辑

2004年10月14日

摘要: 在服务器控件的Url属性里,~ 代表 ApplicationPath?在.Text里看到太多的~/了,可在网上却查不到~/的资料,自己测了一下,觉得~就是代表ApplicationPath了。哪位能给个确认,或者给我个网址学习一下。阅读全文
posted @ 2004-10-14 01:00 Addie 阅读(718) 评论(3) 编辑

2004年9月15日

摘要: 至少超出了我的想像。详情:http://aspalliance.com/251为方便阅读,把全文抄过来了:ASP.NET Micro Caching: Benefits of a One-Second CacheAbstract When I start talking about caching, I imagine that many people immediately stop liste...阅读全文
posted @ 2004-09-15 14:10 Addie 阅读(2055) 评论(10) 编辑
CALENDER
<2012年2月>
2930311234
567891011
12131415161718
19202122232425
26272829123
45678910

公告

昵称:Addie
园龄:7年5个月
粉丝:0
关注:0

搜索

 
 

常用链接

随笔分类

随笔档案

文章档案

ASP.Net

Windows Media

最新评论

阅读排行榜

评论排行榜

推荐排行榜


Powered By: 博客园
模板提供沪江博客