技术总奸

2012年10月22日

TypeScript

摘要: 如果没有听说过,大家有必要关注一下TypeScripthttp://www.typescriptlang.org/,微软10月份刚刚发布的,C#之父Anders Hejlsburg为主要参与人员之一,所以从“明星效应”的角度讲,大家也应该关注下。实际上,在我认真看了些介绍以及社区的反映,以及与部分相似项目的对比(Dart from Google, CoffeeScript,Script#),觉得很有必要关注甚至马上学习使用它,并且它是很容易上手的。TypeScript is a language for application-scale JavaScript development.Type 阅读全文

posted @ 2012-10-22 16:26 阿福 阅读(2748) 评论(2) 推荐(2) 编辑

2012年7月6日

forms authentication failed the ticket supplied was invalid错误 (Windows Server 2008 + IIS 7.5)

摘要: 客户系统部署在Web Farm环境中,前端2台Web Server(Windows Server 2008 + IIS 7.5)。偶然登录进一台Server发现Windows提示有系统更新,随手点了更新,于是就杯具了。第二天,许多客户反映,登录进系统后会被频繁退出,时间间隔很短,甚至每个Post后都会被退出。查看系统日志,发现了大量forms authentication failed the ticket supplied was invalid错误。Google了下,发现是Windows Security Update for .Net Framework的问题,具体见Scott的博客ht 阅读全文

posted @ 2012-07-06 12:32 阿福 阅读(914) 评论(0) 推荐(0) 编辑

2012年6月29日

jQuery Mobile 1.1.1 RC1发布

摘要: http://jquerymobile.com/blog/2012/06/28/announcing-jquery-mobile-1-1-1-rc1/ 阅读全文

posted @ 2012-06-29 11:38 阿福 阅读(292) 评论(0) 推荐(0) 编辑

2012年6月23日

HashSet<T> vs List<T>

摘要: 大数据量下,生成HashSet成本要稍高于List。但查询HashSet效率要远高于List。 static void Main(string[] args) { Stopwatch watch = new Stopwatch(); List<string> list = new List<string>(); HashSet<string> hash = new HashSet<string>(); watch.Start(); for (int i = 0; i <... 阅读全文

posted @ 2012-06-23 22:41 阿福 阅读(1170) 评论(0) 推荐(0) 编辑

2012年4月18日

不要用把无序GUID既作为主键又作为聚集索引

摘要: 我一直想当然的认为用GUID做主键没什么大不了,不就是比int多了12位而已吗?而且现在都是SQL Server 2008, 2012时代了,应该更不是问题了吧?而且微软很多项目也是用GUID做主键啊?Sharepoint, ASP.NET SQL Server Membership Provider默认的表等等。而且还有许多而且......果真这样吗?直到我读了这两篇文章后GUIDs as PRIMARY KEYs and/or the clustering key和THAT'S NOT THE POINT!!!,结论令我很吃惊,甚至是“震撼”。确切的讲,这种糟糕的结果不仅仅是使用G 阅读全文

posted @ 2012-04-18 15:02 阿福 阅读(7239) 评论(4) 推荐(1) 编辑

2012年4月10日

WCF Data Services 5.0 RTM发布

摘要: http://blogs.msdn.com/b/astoriateam/archive/2012/04/09/wcf-data-services-5-0-rtm-release.aspx 阅读全文

posted @ 2012-04-10 10:31 阿福 阅读(620) 评论(0) 推荐(0) 编辑
EF Power Tools Beta 2发布

摘要: http://blogs.msdn.com/b/adonet/archive/2012/04/09/ef-power-tools-beta-2-available.aspx 阅读全文

posted @ 2012-04-10 10:19 阿福 阅读(711) 评论(3) 推荐(0) 编辑

2012年4月9日

Entity Framework 5性能方面的注意事项

摘要: ADO.NET小组发布了一篇关于Entity Framework 5性能方面的指导性文档,http://msdn.microsoft.com/en-us/data/hh949853。涵盖了:View generation.Caching.Query Execution Options.Inheritance Strategies.Lazy Loading vs. Eager Loading.其他.原文:EF5 Performance Considerations 阅读全文

posted @ 2012-04-09 16:59 阿福 阅读(1477) 评论(0) 推荐(0) 编辑
jQuery Mobile 1.1.0 RC2发布

摘要: jQuery Mobile 1.1.0 RC2 Released支持jQuery 1.6.4 和 1.7.1。还不支持(1.7.2)。 阅读全文

posted @ 2012-04-09 12:22 阿福 阅读(431) 评论(0) 推荐(0) 编辑

2012年4月5日

源码+幻灯片:学习HTML5/jQuery/ASP.NET MVC/EF Code First的绝佳资源Account at a Glance项目

摘要: Account at a Glance是由Dan Walin主持开发的一个Web应用程序,这是一个实际上线的产品,由真实的Team开发,并非是为了演示某些技术而做的Demo程序。前端基于HTML5+jQuery,后端基于ASP.NET MVC+EF Code First。前端使用了很多jQuery和HTML5的插件和库,实现多视图、拖拽、图表、视频等特性以及对老版本浏览器的支持。很好的展示了HTML5+js+CSS的客户端解决方案。虽然与Silverlight等基于浏览器插件的解决方案相比,未免显得繁琐,但毕竟这是“真正”地浏览器端应用,真正的跨平台跨浏览器:)本文源自作者博客Code and 阅读全文

posted @ 2012-04-05 15:47 阿福 阅读(3742) 评论(8) 推荐(5) 编辑

2012年4月3日

使用Autofac在ASP.NET Web API上实现依赖注入

摘要: 【原文】Dependency Injection in ASP.NET Web API using Autofac摘要在ASP.NET Web API里使用Autofac通过NuGet安装Autofac.WebApi。(当然要先安装Autofac.dll)。PM > Install-Package Autofac.WebApi引用如下命名空间。using Autofac;using Autofac.Integration.WebApi;再按照如下代码配置Autofac。 public static class Bootstrapper { public static voi... 阅读全文

posted @ 2012-04-03 11:22 阿福 阅读(14243) 评论(1) 推荐(1) 编辑

2012年3月30日

在Windows Azure上开发ASP.NET程序与在Windows Sever上有何不同

摘要: 【原文】The Differences Between Development on Windows Azure and Windows Server摘要Azure的架构和状态管理对于架构的考虑,普通的ASP.NET应用与在Azure上的没有什么不同,一些重要的包括:整个程序的架构,如n层的还是面向服务的(n-Tier or SOA),代码存在并运行在哪里。定义那些层是服务层,哪些是面向用户的(customer facing)。数据存储在哪。状态管理以及性能。安全。已经运行在IIS上ASP.NET应用如果要迁移到Azure,可参考Azure Application profile guidan 阅读全文

posted @ 2012-03-30 11:43 阿福 阅读(1656) 评论(0) 推荐(1) 编辑

2012年3月29日

充分利用缓存来提高网站性能

摘要: [原文作者]:Omar [原文链接]:Making best use of cache for high performance website使用URLs时要确保一致性 浏览器基于URL来缓存资源。当URL改变后,浏览器从源服务器获该资源的新的版本。查询字符串参数的改变也被视为URL的改变。例如,"/default.aspx" 被缓存到浏览器,如果你请求了"/default.aspx?123",浏览器将从服务器获取新的版本。对于这个新URL的响应,如果你返回的是正确的缓存报头,它仍然会被缓存。这样的话,再把查询字符串改成类似于"/defaul 阅读全文

posted @ 2012-03-29 10:48 阿福 阅读(2425) 评论(3) 推荐(4) 编辑

2012年3月28日

ASP.NET MVC 4, ASP.NET Web API, ASP.NET Web Pages v2 (Razor)全部开源,并接受来自社区的贡献(contributions)

摘要: 更新:看来微软的一小步引起了社区的大反响,看看来自Phil Haack的评论(前微软ASP.NET MVC Project Manager现已加入GitHub)。看来微软走出这一步还是不容易的,(不是指open souce,而是指accept external contributions)。来自Scott Guthrie以及Scott Hanselman博客的消息,ASP.NET MVC 4, ASP.NET Web API, ASP.NET Web Pages v2 (Razor)全部开源,并接受来自社区的贡献(contributions)。源码仍通过CodePlex发布,地址是http:/ 阅读全文

posted @ 2012-03-28 13:21 阿福 阅读(2807) 评论(3) 推荐(0) 编辑

2012年3月23日

EF5 beta2通过NuGet发布

摘要: 原文链接:EF5 Beta 2 Available on NuGet,以下一些摘要翻译。Beta1之后的改动了些什么?Beta2主要是Quality的提升,以下是Beta1以来的一些较显著的变动:修复了Migrations命令在Visual Studio 2010下无法工作的bug。数据库相关的Data Annotations转移到了System.ComponentModel.DataAnnotations.Schema命名空间。修复了“Sequence contains no elements” bug 。简化了web.config/app.config注册默认数据库的配置。LocalDb数 阅读全文

posted @ 2012-03-23 12:07 阿福 阅读(1441) 评论(2) 推荐(0) 编辑

2012年3月22日

Getting Started with HTML5

摘要: http://blogs.msdn.com/b/publicsector/archive/2012/02/29/getting-started-with-html5.aspx推荐博客:http://userinexperience.com/ 阅读全文

posted @ 2012-03-22 17:44 阿福 阅读(329) 评论(0) 推荐(0) 编辑
开发HTML5应用你需要了解的

摘要: HTML5 featuresModernizerHTML5 BoilerplatejQuery along with several jQuery plug-insjQuery Templates,Knockout.js, Upshot. (更多backbone.js, jsRender&jsView等)CanvasSVGCSS3JSON and AJAX technologiesSingle Page Application (SPA)Javascript Patterns来源:Dan Wahlin's WebLog推荐:Building the Account at a G 阅读全文

posted @ 2012-03-22 17:11 阿福 阅读(525) 评论(0) 推荐(0) 编辑
WCF入门资源

摘要: 最近项目需要使用WCF,所以比较系统的学习了一下。这里介绍下经验,以便其他初学者借鉴。我的基础:7年.Net开发经验,熟悉和使用过Web Service(ASMX),对WCF有所了解,但比较零碎,没有大规模使用过。简单讲我是通过读了2本书来学习的,我觉得这2本书阅读顺序很有必要强调下。Learning WCF: A Hands-on Guide优点:这本书在总体上介绍了WCF来龙去脉,涉及了WCF的原理,也从行业发展的角度进行了介绍,能够使你在根源上有个认知。而且这本通过详细的实例来阐述WCF的各个知识点,循序渐进,非常适合初学者,从它的名字Hand-on大家也可以判断出这个特点。缺点:这本书 阅读全文

posted @ 2012-03-22 12:18 阿福 阅读(1326) 评论(1) 推荐(1) 编辑

2012年3月21日

jquery history plugin, url hash

摘要: jQuery BBQ http://benalman.com/projects/jquery-bbq-plugin/History.js https://github.com/balupton/history.jsjQuery history https://github.com/balupton/jquery-historyMore http://stackoverflow.com/questions/4347168/jquery-history-plugin 阅读全文

posted @ 2012-03-21 18:15 阿福 阅读(1095) 评论(0) 推荐(0) 编辑

2010年1月1日

Run Tasks in an ASP.NET Application Domain

摘要: Keywords: Task implement, ASP.NET 2.0 Provider ModelWeb应用中有很多耗时的操作比如发送email、生成报表、处理上传图片等等,这些操作是不适合放到页面中的。比如回复一个帖子后email通知所有订阅了该帖子更新的用户,如果在回复操作中处理,那么用户回复帖子时大部分的时间就会浪费在发送email上了。在CommunityServer里,类似的耗时的操作都被独立出来,作为独立的任务运行于服务端同一程序域中的一个或多个线程中。本文通过email notification的实现,来具体了解一下这种实现模式。涉及的知识点包括:.NET configur 阅读全文

posted @ 2010-01-01 00:00 阿福 阅读(210) 评论(0) 推荐(0) 编辑
ASP.NET2.0 Menu Control set static item selected when select its child dynamic items

摘要: Menu控件是将当前的url与其自身items中的url做比较,将相同的item置于选中状态。但是通常我们只是显示一级静态item,这样动态item处于选中状态时我们是不能直接看到的,只能在打开静态menuitem的下拉列表才能看到。而且有时我们根本就不显示动态items。而我们通常的需求是:只要是在sitemap文件里被组织在一个树型结构里的页面,我都希望在进入它时,menu控件的对应根节点处于选中状态,这样再配合selectedstyle,我们很容易将网站各个功能模块用不同的样式区分开。很可惜menu控件默认不支持这个功能,下个版本据说会加进去。目前我们可以通过控制MenuItemData 阅读全文

posted @ 2010-01-01 00:00 阿福 阅读(164) 评论(0) 推荐(0) 编辑
Error while calling the Roles.AddUserToRole (error message: Cannot resolve collation conflict fo

摘要: http://forums.asp.net/thread/1189176.aspx 阅读全文

posted @ 2010-01-01 00:00 阿福 阅读(214) 评论(0) 推荐(0) 编辑
Cool&nbsp;Tips&nbsp;and&nbsp;Tricks&nbsp;with&nbsp;ASP.NET&nbsp;2.0&nbsp;posted&nbsp;by&nbsp;Scott

摘要: 内容包括:App_Offline.htm 将此文件添加到网站根目录后,网站就处于“脱机”状态,所有请求都返回该文件内容。在网站进行大的维护时很有用;Cross Page item-backs 跨页面的post-back;Validation Groups 对同一页面的验证控件分组,解决了提交页面时所有验证都执行的缺点;Maintaining Scroll Position 页面往返后,保持之前的... 阅读全文

posted @ 2010-01-01 00:00 阿福 阅读(84) 评论(0) 推荐(0) 编辑
Search&nbsp;Box

摘要: Master the Art of Search with this Custom Control that Provides the Ability to Search Your Site, Other Sites, or the Entire Web 阅读全文

posted @ 2010-01-01 00:00 阿福 阅读(107) 评论(0) 推荐(0) 编辑
CSS:&nbsp;color&nbsp;style&nbsp;solution&nbsp;with&nbsp;css&nbsp;contexual&nbsp;selectors

摘要: Your web site always contains several modules which navigated by a menu or sth, just like this: forums | Blog | Photos. You may want each module has its own color style, so the users can recognize ea... 阅读全文

posted @ 2010-01-01 00:00 阿福 阅读(267) 评论(0) 推荐(0) 编辑
Pointers&nbsp;to&nbsp;Great&nbsp;ASP.NET&nbsp;Atlas&nbsp;Content

摘要: From Scott's blog. 阅读全文

posted @ 2010-01-01 00:00 阿福 阅读(94) 评论(0) 推荐(0) 编辑
Efficient&nbsp;Data&nbsp;Paging&nbsp;and&nbsp;Sorting&nbsp;with&nbsp;ASP.NET&nbsp;2.0&nbsp;and&nbsp;SQL&nbsp;2005

摘要: Efficient Data Paging and Sorting with ASP.NET 2.0 and SQL 2005Just a placeholder for myself. 阅读全文

posted @ 2010-01-01 00:00 阿福 阅读(67) 评论(0) 推荐(0) 编辑
RSS&nbsp;ToolKit&nbsp;for&nbsp;ASP.NET&nbsp;2.0

摘要: Dmitry,ASP.NET 开发组成员,更新了他的 ASP.NET RSS Toolkit(version 1.0.0.1).。是熟悉ASP.NET中RSS应用(consuming and exposing)的好机会。详细情况可以去Scott's blog 看看,here。下载到这里,带源码的。 阅读全文

posted @ 2010-01-01 00:00 阿福 阅读(77) 评论(0) 推荐(0) 编辑
天仙妹妹

摘要: 刚刚在chinaren主页上看到一个手机广告,居然用的是天仙妹妹的形象,就那个云南的很清纯的少数民族妹妹。图片不大,所以不确定是不是她本人。这么清纯原始的美就这么没有了。 阅读全文

posted @ 2010-01-01 00:00 阿福 阅读(94) 评论(0) 推荐(0) 编辑
是不是真话不重要

摘要: 是不是真话不重要,关键是听的人高兴,听的人感动就行了。像我这么老实的人,说谎对我简直就是折磨啊!但是把别人的快乐建立在自己的痛苦之上,我愿意啊!这么TM是何等境界啊! 祝大家还配牛也! 阅读全文

posted @ 2010-01-01 00:00 阿福 阅读(90) 评论(0) 推荐(0) 编辑