<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title type="text">博客园_梁逸晨的IT专栏_分类_开发</title><id>http://feed.cnblogs.com/blog/u/24297/category/110411/rss</id><updated>2012-06-03T15:41:56Z</updated><generator>feed.cnblogs.com</generator><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kvspas/category/110411.html"/><link rel="self" type="application/atom+xml" href="http://feed.cnblogs.com/blog/u/24297/category/110411/rss"/><entry><id>http://www.cnblogs.com/kvspas/archive/2012/02/17/2355689.html</id><title type="text">Metadata publishing for this service is currently disabled 的解决偏方</title><summary type="text">我的这个方法一定是不登大雅之堂的，所以称之为“偏方”，但是对于解决启用ajax的wcf出现 Metadata publishing for this service is currently disabled 一定有效。</summary><published>2012-02-17T05:56:00Z</published><updated>2012-02-17T05:56:00Z</updated><author><name>梁逸晨</name><uri>http://www.cnblogs.com/kvspas/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kvspas/archive/2012/02/17/2355689.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kvspas/archive/2012/02/17/2355689.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/kvspas/archive/2012/02/10/Code-First_SQLServer_Compact_4-0.html</id><title type="text">Code-First 在SQLServer Compact 4.0 中的应用（一），基础配置</title><summary type="text">SQLServer Compact 4.0 是代替Access构建轻量级程序的完美方案，特别是在Web程序中。 在CodeFirst的搭配下，更能够加速我们的开发效率，本文就如何构建运行环境作一番记录。</summary><published>2012-02-09T18:49:00Z</published><updated>2012-02-09T18:49:00Z</updated><author><name>梁逸晨</name><uri>http://www.cnblogs.com/kvspas/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kvspas/archive/2012/02/10/Code-First_SQLServer_Compact_4-0.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kvspas/archive/2012/02/10/Code-First_SQLServer_Compact_4-0.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/kvspas/archive/2012/02/03/2336609.html</id><title type="text">for与foreach，在遍历属性时的差别，for能够更安全的获取数据</title><summary type="text">某些类的某些属性，由于实现了IQueryable或IEnumerable， 能够更方便、更优美地使用foreach查询。 但是在一些特殊情况下，foreach不一定能够查询到准确的值，例如以下情况： 建造一个HtmlTable (runat=server)，至少有一行数据，内容任意，然后再建造一个添加行数据的方法，在每次添加完数据之后，立即使用 foreach(var i in obj.Rows) 查询，这时候就会出现“集合已经更改”的错误。</summary><published>2012-02-03T02:10:00Z</published><updated>2012-02-03T02:10:00Z</updated><author><name>梁逸晨</name><uri>http://www.cnblogs.com/kvspas/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kvspas/archive/2012/02/03/2336609.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kvspas/archive/2012/02/03/2336609.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/kvspas/archive/2012/01/26/2329537.html</id><title type="text">图解MVC中的路由设置对应的Contorller和View</title><summary type="text">以上是默认的情况， 执行顺序我们这样理解： 1：首先定位到HomeController类。2：然后定位到Index方法。关于类的映射：路由设置中，controller = "Home" 会映射到HomeController类， 而HomeController类的类名，我们需要拆分为两个单词去理解： "Home"+"Controller"。 路由会查找到前面的那个词语，并绑定之，在这里是属于名称半匹配。关于方法的映射：action = "Index" 映射到 Index 方法，是属于全名匹配。默认的例子可能会带来一个</summary><published>2012-01-25T19:33:00Z</published><updated>2012-01-25T19:33:00Z</updated><author><name>梁逸晨</name><uri>http://www.cnblogs.com/kvspas/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kvspas/archive/2012/01/26/2329537.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kvspas/archive/2012/01/26/2329537.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/kvspas/archive/2012/01/03/webform-master-control.html</id><title type="text">WebForm中搭配母版页和用户控件页时候的事件加载顺序，附测试程序</title><summary type="text">在生产环境中，一个内容页(aspx)可能会包含数个用户控件(ascx)，而每个控件可能都会涉及到数据库访问。如果在内容页、母版页、控件页中各自使用自己的数据库访问方法，会造成很大的运行成本。这样的情况下，我们就应该重用数据库连接了，但是在这之前，需要搞清楚内容页、母版页和控件页的加载顺序。这篇文章中先给出它们的加载顺序，数据库重用部分留下一篇中再详解</summary><published>2012-01-02T16:56:00Z</published><updated>2012-01-02T16:56:00Z</updated><author><name>梁逸晨</name><uri>http://www.cnblogs.com/kvspas/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kvspas/archive/2012/01/03/webform-master-control.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kvspas/archive/2012/01/03/webform-master-control.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/kvspas/archive/2011/12/30/sina-oauth-21323.html</id><title type="text">新浪OAuth网站登陆连接，请求access_token时遇到21323 miss client id or secret 的解决方案</title><summary type="text">我始终认为是我的错误，而不是新浪的错误，所以，电脑屏幕翻转了180度，没发现什么特别的隐藏说明，接着又拿一块大镜子来看镜像，还是没发现什么，最后使出了绝招： 把文档的所有文字按照奇数和偶数都排列着读一遍，依旧无解。 终于： 我开始觉得不是我的错了，而是新浪的错。 本文给出ASP.NET 4.0的解决方案以及实现思路。</summary><published>2011-12-29T23:11:00Z</published><updated>2011-12-29T23:11:00Z</updated><author><name>梁逸晨</name><uri>http://www.cnblogs.com/kvspas/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kvspas/archive/2011/12/30/sina-oauth-21323.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kvspas/archive/2011/12/30/sina-oauth-21323.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/kvspas/archive/2011/12/11/2283859.html</id><title type="text">Team Foundation Server 2010配置数据库遇到“与某个指定的域或工作组帐户冲突”的解决方案</title><summary type="text">一开始没有认真看错误信息，于是到处搜索解决办法， 不是叫你杀毒就是叫你重启，包括某个知名的社区在内，除了假惺惺的“你好”二字外，和百度知道没有本质区别。回来硬头皮搞，过程就不详述了，其实，错误描述已经包含了答案，只不过我们的心里作用让我们很少去注释他们。</summary><published>2011-12-11T04:32:00Z</published><updated>2011-12-11T04:32:00Z</updated><author><name>梁逸晨</name><uri>http://www.cnblogs.com/kvspas/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kvspas/archive/2011/12/11/2283859.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kvspas/archive/2011/12/11/2283859.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/kvspas/archive/2011/05/01/2034047.html</id><title type="text">LINQ查询中，对于值类型的比较应注意使用Value属性</title><summary type="text">例如，对于入住天数，如果我们使用 ：data.Where(o =&gt; o.custom_livedays.Equals(_livedays));在语义上是没有问题的，但是不会得到我们想要的答案，正确的写法是：data.Where(o =&gt; o.custom_livedays.Value.Equals(_livedays)); 仅对于值类型是如此，如果是引用类型，例如string, 那么就用不着value属性了。例如：data.Where(o =&gt; o.custom_name.Equals("字符串值"));</summary><published>2011-05-01T12:23:00Z</published><updated>2011-05-01T12:23:00Z</updated><author><name>梁逸晨</name><uri>http://www.cnblogs.com/kvspas/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kvspas/archive/2011/05/01/2034047.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kvspas/archive/2011/05/01/2034047.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/kvspas/archive/2010/08/31/security-extends.html</id><title type="text">在继承机制中引用继承权校验</title><summary type="text">在某些特殊情况下，我们需要把类型设计为public class（这是前提条件，所以internal 声明无效），但是却又不想给人无条件调用或者继承该类，这时候我们可以把类设计为 public abstract class，就避免了直接创建它的对象，但是不想被无条件继承，则要动一番脑经了。这样的情况在实际运用中还是存在的： 比如某个DLL中的某些公共类，只有具备某些权限的开发人员才能够继承之， 或者是某些收费组件，必须提供序列号，才能够继承调用。</summary><published>2010-08-31T15:05:00Z</published><updated>2010-08-31T15:05:00Z</updated><author><name>梁逸晨</name><uri>http://www.cnblogs.com/kvspas/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kvspas/archive/2010/08/31/security-extends.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kvspas/archive/2010/08/31/security-extends.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/kvspas/archive/2010/07/03/dbhelper_factory_web_medium.html</id><title type="text">IIS中等信任环境下（medium），DbProviderFactories.GetFactory不能调用非微软数据库的简单替代方案。</title><summary type="text">如果您能够保证自己的程序今后永远都能够运行在“完全信任”等级的IIS中，本文不适合您。记得我小学五年级的时候，语文老师（同时也是我班主任）经常布置一些生词给我们造句，就拿“简洁”这个词来说，很难琢磨出一句话来交作业，没办法，我承认我智商比较低。但是我总感觉应该有一种万能的方法，可以快速过关，以不变应万变的。 所以，当时我花了几天时间来研究了一下诸子百家和四库全书，最终得出这个方案</summary><published>2010-07-03T13:55:00Z</published><updated>2010-07-03T13:55:00Z</updated><author><name>梁逸晨</name><uri>http://www.cnblogs.com/kvspas/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kvspas/archive/2010/07/03/dbhelper_factory_web_medium.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kvspas/archive/2010/07/03/dbhelper_factory_web_medium.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/kvspas/archive/2009/06/10/1500095.html</id><title type="text">剑术，语言和模式</title><summary type="text">借用独孤求败前辈的武学归纳：利剑、软剑、重剑、木剑、无剑 五个阶段来对我们开发者作一下经历形容，本文纯属扯蛋性质。</summary><published>2009-06-09T18:01:00Z</published><updated>2009-06-09T18:01:00Z</updated><author><name>梁逸晨</name><uri>http://www.cnblogs.com/kvspas/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kvspas/archive/2009/06/10/1500095.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kvspas/archive/2009/06/10/1500095.html"/><content type="text">借用独孤求败前辈的武学归纳：利剑、软剑、重剑、木剑、无剑 五个阶段来对我们开发者作一下经历形容，本文纯属扯蛋性质。</content></entry><entry><id>http://www.cnblogs.com/kvspas/archive/2009/06/06/1497389.html</id><title type="text">开发者的信用责任意识和自重意识</title><summary type="text">客户对于产品的修改要求分为两种，从我们开发者的角度来说，可以理解为：良性意见和恶性意见。本文主要阐述的是后者。</summary><published>2009-06-05T20:47:00Z</published><updated>2009-06-05T20:47:00Z</updated><author><name>梁逸晨</name><uri>http://www.cnblogs.com/kvspas/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kvspas/archive/2009/06/06/1497389.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kvspas/archive/2009/06/06/1497389.html"/><content type="text">客户对于产品的修改要求分为两种，从我们开发者的角度来说，可以理解为：良性意见和恶性意见。本文主要阐述的是后者。</content></entry><entry><id>http://www.cnblogs.com/kvspas/archive/2009/01/14/1375913.html</id><title type="text">甘露模型的装饰模式实现</title><summary type="text">javascript设计模式探讨：甘露模型的装饰模式实现。解决两个常见问题：1 随着需求的不断增多，基类的property也不断增多，很多时候一个对象的生存期仅仅是做一件事情（仅需要一个property），而它在创建期上却加载了100个property。2 直接使用逐渐增加的property扩展，很难说会不会今天喝醉了搞了个闭包进来，没人发觉，明天弄了个依赖全局对象的东西进来，也没人发觉。半年之后才发觉程序变得很慢很难维护的时候，这种隐式杀手是不可能找得出来的。这就是大型长期项目不能简单使用原型扩展的原因。</summary><published>2009-01-14T14:17:00Z</published><updated>2009-01-14T14:17:00Z</updated><author><name>梁逸晨</name><uri>http://www.cnblogs.com/kvspas/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kvspas/archive/2009/01/14/1375913.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kvspas/archive/2009/01/14/1375913.html"/><content type="text">javascript设计模式探讨：甘露模型的装饰模式实现。解决两个常见问题：1 随着需求的不断增多，基类的property也不断增多，很多时候一个对象的生存期仅仅是做一件事情（仅需要一个property），而它在创建期上却加载了100个property。2 直接使用逐渐增加的property扩展，很难说会不会今天喝醉了搞了个闭包进来，没人发觉，明天弄了个依赖全局对象的东西进来，也没人发觉。半年之后才发觉程序变得很慢很难维护的时候，这种隐式杀手是不可能找得出来的。这就是大型长期项目不能简单使用原型扩展的原因。</content></entry><entry><id>http://www.cnblogs.com/kvspas/archive/2008/12/25/1361932.html</id><title type="text">回忆孔先生</title><summary type="text">听人家背地里谈论，孔乙己原来也读过书，还是NVP和NCSE，但终于没有进学，又不会营生；于是愈过愈穷，弄到将要讨饭了。幸而写得一手漂亮的代码，运行起来很快很强大，便接一些私活，换一碗饭吃。可惜他又有一样坏脾气，便是摆着看过几本书的架子愤世嫉俗。坐不到几天，便在同事的代码里面挑刺，说这段不符合什么规矩原则，那段没有实现接口……搞得团队很紧张，经常延误工时。如是几次，叫他做事的人也没有了。孔乙己没有法，便免不了偶然做些入侵银行主机的事。</summary><published>2008-12-24T20:31:00Z</published><updated>2008-12-24T20:31:00Z</updated><author><name>梁逸晨</name><uri>http://www.cnblogs.com/kvspas/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kvspas/archive/2008/12/25/1361932.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kvspas/archive/2008/12/25/1361932.html"/><content type="text">听人家背地里谈论，孔乙己原来也读过书，还是NVP和NCSE，但终于没有进学，又不会营生；于是愈过愈穷，弄到将要讨饭了。幸而写得一手漂亮的代码，运行起来很快很强大，便接一些私活，换一碗饭吃。可惜他又有一样坏脾气，便是摆着看过几本书的架子愤世嫉俗。坐不到几天，便在同事的代码里面挑刺，说这段不符合什么规矩原则，那段没有实现接口……搞得团队很紧张，经常延误工时。如是几次，叫他做事的人也没有了。孔乙己没有法，便免不了偶然做些入侵银行主机的事。</content></entry><entry><id>http://www.cnblogs.com/kvspas/archive/2008/12/15/1355033.html</id><title type="text">Dllimport时要注意的一些问题，特别是工作在64位IIS7的必看。</title><summary type="text">本文描述了Dllimport加载WIN32代码时遇到的一些看似在32位系统下工作正常，但是只有在64位系统下才会显现出来的基本注意事项。</summary><published>2008-12-14T23:25:00Z</published><updated>2008-12-14T23:25:00Z</updated><author><name>梁逸晨</name><uri>http://www.cnblogs.com/kvspas/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kvspas/archive/2008/12/15/1355033.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kvspas/archive/2008/12/15/1355033.html"/><content type="text">本文描述了Dllimport加载WIN32代码时遇到的一些看似在32位系统下工作正常，但是只有在64位系统下才会显现出来的基本注意事项。</content></entry><entry><id>http://www.cnblogs.com/kvspas/archive/2008/12/06/1349373.html</id><title type="text">给.Net程序员和WEB程序员的一些工作行为建议。</title><summary type="text"> 本文仅仅是一篇程序员职业行为建议，不存在任何源代码，也并不能自动化解决问题。但是相信做的人多了，自然也会有效果了。适用于两类读者：1，使用 .Netframework开发应用程序（主要是桌面程序）的程序员。2 后台语言不限，工作中接触到css和javascript的WEB程序员。总共分为两章：.Net篇和IE6篇</summary><published>2008-12-06T15:16:00Z</published><updated>2008-12-06T15:16:00Z</updated><author><name>梁逸晨</name><uri>http://www.cnblogs.com/kvspas/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kvspas/archive/2008/12/06/1349373.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kvspas/archive/2008/12/06/1349373.html"/><content type="text"> 本文仅仅是一篇程序员职业行为建议，不存在任何源代码，也并不能自动化解决问题。但是相信做的人多了，自然也会有效果了。适用于两类读者：1，使用 .Netframework开发应用程序（主要是桌面程序）的程序员。2 后台语言不限，工作中接触到css和javascript的WEB程序员。总共分为两章：.Net篇和IE6篇</content></entry><entry><id>http://www.cnblogs.com/kvspas/archive/2008/12/06/clrnetframework.html</id><title type="text">根据客户端操作系统类型和CLR信息来判断.netframework的支持情况</title><summary type="text">我们常在给客户下载某个程序的时候，需要首先获知客户是否已经安装有CLR，现在最普遍的是判断是否安装有CLR2.0，下面是我在做某个软件下载的时候用到的一段算法，按照现实情况，支持到2011年没有问题。下面发出来，大家共勉。最低要求是WINDOWS5.0，也就是WINDOWS2000，9X系列可以无视掉。最高判断出WINDOWS7。</summary><published>2008-12-05T18:39:00Z</published><updated>2008-12-05T18:39:00Z</updated><author><name>梁逸晨</name><uri>http://www.cnblogs.com/kvspas/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kvspas/archive/2008/12/06/clrnetframework.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kvspas/archive/2008/12/06/clrnetframework.html"/><content type="text">我们常在给客户下载某个程序的时候，需要首先获知客户是否已经安装有CLR，现在最普遍的是判断是否安装有CLR2.0，下面是我在做某个软件下载的时候用到的一段算法，按照现实情况，支持到2011年没有问题。下面发出来，大家共勉。最低要求是WINDOWS5.0，也就是WINDOWS2000，9X系列可以无视掉。最高判断出WINDOWS7。</content></entry><entry><id>http://www.cnblogs.com/kvspas/archive/2008/11/02/1324865.html</id><title type="text">委托的演化：命名函数、匿名函数、lambda表达式</title><summary type="text">从1.0到3.0，语法显得明朗化和简洁多了 。</summary><published>2008-11-02T09:23:00Z</published><updated>2008-11-02T09:23:00Z</updated><author><name>梁逸晨</name><uri>http://www.cnblogs.com/kvspas/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kvspas/archive/2008/11/02/1324865.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kvspas/archive/2008/11/02/1324865.html"/><content type="text">从1.0到3.0，语法显得明朗化和简洁多了 。</content></entry><entry><id>http://www.cnblogs.com/kvspas/archive/2008/06/19/1226046.html</id><title type="text">扯谈虚拟机语言的最大致命伤</title><summary type="text">.NET好不好？好！JAVA快不快？快！你安装了没有？没有！</summary><published>2008-06-19T08:44:00Z</published><updated>2008-06-19T08:44:00Z</updated><author><name>梁逸晨</name><uri>http://www.cnblogs.com/kvspas/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kvspas/archive/2008/06/19/1226046.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kvspas/archive/2008/06/19/1226046.html"/><content type="text">.NET好不好？好！JAVA快不快？快！你安装了没有？没有！</content></entry><entry><id>http://www.cnblogs.com/kvspas/archive/2008/02/28/1085136.html</id><title type="text">基于“甘露模型”的多重继承和接口实现，附带“准”桥接模式的验证</title><summary type="text">        看了李战师兄的《悟透javascript》，受益非浅。基于甘露模型的基础上，我稍微做了些修改，支持了多重继承和接口（浏览器、ASP-jscript和jscript.net三种环境下调试通过）。</summary><published>2008-02-28T09:07:00Z</published><updated>2008-02-28T09:07:00Z</updated><author><name>梁逸晨</name><uri>http://www.cnblogs.com/kvspas/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kvspas/archive/2008/02/28/1085136.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kvspas/archive/2008/02/28/1085136.html"/><content type="text">        看了李战师兄的《悟透javascript》，受益非浅。基于甘露模型的基础上，我稍微做了些修改，支持了多重继承和接口（浏览器、ASP-jscript和jscript.net三种环境下调试通过）。</content></entry></feed>
