12 2009 档案

Silverlight中无法使用Delegate.CreateDelegate()来创建对无法访问的方法的委托
摘要:这个标题很绕口,先说说我是怎么遇到这个问题的。 如果对问题解决过程不感兴趣,可以直接跳到最后看应对方法。 现在在做的一个项目使用了微软patterns & practices小组的Prism(Composite Application Guidance)框架,其提供了一个事件框架,使用IEventAggregator可以轻松创建低耦合的事件驱动应用程序。由于以前在WPF下使用过Prism,... 阅读全文

posted @ 2009-12-20 08:35 Gildor Wang 阅读(807) 评论(1) 推荐(0) 编辑

Silverlight调用WCF服务遇到SecurityError
摘要:错误信息开头是这样的"An error occurred while trying to make a request to URI 'http://localhost:8005/Service1.svc'. This could be due to a cross domain configuration error. Please see the inner exception for mor... 阅读全文

posted @ 2009-12-17 01:49 Gildor Wang 阅读(429) 评论(0) 推荐(0) 编辑

Silverlight中使用配置文件方法
摘要:Silverlight Application是客户端程序,没有也无法访问服务端的web.config,它自己也不允许添加.config文件,那如何方便地更改配置而不用重新发布呢?找了许多地方,基本上总结出来一个办法。 一般情况下,SL App是由一个Web Application来host的,而那个Web Application是可以方便地配置的,于是,我们可以考虑由网站来把配置传给Silver... 阅读全文

posted @ 2009-12-17 01:21 Gildor Wang 阅读(1011) 评论(0) 推荐(0) 编辑

启动WCF服务时出现WCF Error: HTTP could not register URL http://+:xxxx/... Your process does not have access rights to this namespace
摘要:此错误原因是WCF服务选择的endpoint中指定的地址没有预留(reserved),MSDN上这篇文章详细描述了问题和解决方法。简单地说有以下几种办法: 使用VS自动生成的地址,一般是http://localhost:xxxx/Design_Time_Addresses/ (xxx为端口号),只要是以这个地址开头的都可以正常使用。 有些情况下,不能使用这样的地址,比如要在域名根目录下发布一些文... 阅读全文

posted @ 2009-12-17 01:09 Gildor Wang 阅读(972) 评论(0) 推荐(1) 编辑

Silverlight调用WCF服务出现The remote server returned an error: NotFound可能原因
摘要:刚开始开发时遇到了"The remote server returned an error: NotFound."这样的异常。 第一次是由于服务地址填错了,即在Silverlight Application中创建EndpointAddress时传入了错误的uri参数,修改正确后异常消失。 但不久又遇到此异常,而检查过后发现地址正确。同时,使用WcfTestClient工具也不能正确调用服务方法。于... 阅读全文

posted @ 2009-12-17 00:46 Gildor Wang 阅读(537) 评论(0) 推荐(0) 编辑

添加WCF服务引用失败解决办法
摘要:最近在玩SL4 beta,写了一个WCF的服务,在Silverlight Application中选择Add Service Reference,填入服务地址,但在生成服务引用代码(应该就是代理类)时发生错误:Error 7 Custom tool error: Failed to generate code for the service reference ‘xxx’. Please chec... 阅读全文

posted @ 2009-12-17 00:38 Gildor Wang 阅读(1250) 评论(0) 推荐(1) 编辑

使用dynamic特性处理XML文档
摘要:处理XML文档是我们经常需要进行的一项工作,尤其是在进行网络服务相关编程时,比如更新RSS等。在.NET 3.5中引入了Linq To XML,使得XML文档的读写已经大大简化,而.NET 4.0中最新的dynamic特性,则将简化发挥到了极致。以处理白云黄鹤的“十大”为例,数据源地址为http://www.byhh.net/posttop10.xml,其当前内容为(为使结果显示清晰,去掉了其中的... 阅读全文

posted @ 2009-12-06 00:16 Gildor Wang 阅读(469) 评论(0) 推荐(0) 编辑

C#/.NET 4.0新特性生成Excel文档
摘要:直接上代码: using MSExcel = Microsoft.Office.Interop.Excel;public class ExcelHelper{ /// <summary> /// Creates the excel file by column. /// </summary> /// <param name="filename">The file... 阅读全文

posted @ 2009-12-05 06:10 Gildor Wang 阅读(853) 评论(0) 推荐(0) 编辑

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

点击右上角即可分享
微信分享提示