技术总奸

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 阿福 阅读(1171) 评论(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 阿福 阅读(7268) 评论(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 阿福 阅读(14244) 评论(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 阿福 阅读(1657) 评论(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 阿福 阅读(2426) 评论(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 阿福 阅读(527) 评论(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 阿福 阅读(1330) 评论(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) 编辑
ASP.NET&nbsp;2.0&nbsp;Language&nbsp;Swithcer&nbsp;and&nbsp;Theme&nbsp;Swicher&nbsp;多语言转换和多样式主题转换

摘要: 在ASP.NET 2.0 中提供多语言转换和多样式主题转换功能,两种实现形式比较类似,所以放在一起说明一下。1. Language switcher 多语言转换在Quick Start Tutorial中,介绍了如何存储和应用用户选择的语言。一般是用一个DropDownList展示支持的语言,供用户选择,通常是放在masterpage 里面,将用户选择的语言存储起来 这里用了ASP.NET 2.... 阅读全文

posted @ 2010-01-01 00:00 阿福 阅读(144) 评论(0) 推荐(0) 编辑
上“海”-Cycle&nbsp;to&nbsp;the&nbsp;sea.

摘要: 历时2天,行程:1日 城上城(虬江路×共和新路)— 虬江路 - 西藏路 — 北京东路 - 中山东路 - 十六铺摆渡浦东 - 东昌路 - 世纪大道 - 杨高南路 - 浦建路 -杜鹃路(Bill的自行车行与朋友汇合) - 迪卡侬 - 锦绣路罗山路口(朋友家)- 2日 - 杜鹃路(Bill的自行车行 结合点1 此后跟随队伍 具体路线不清楚了)-金桥某路 结合点2 - 延张家浜运河(多为乡间小路)- 海... 阅读全文

posted @ 2010-01-01 00:00 阿福 阅读(127) 评论(0) 推荐(0) 编辑
Atlas&nbsp;Control&nbsp;Toolkit&nbsp;and&nbsp;Source&nbsp;Code&nbsp;for&nbsp;the&nbsp;Build-in&nbsp;Asp.Net&nbsp;2.0&nbsp;Providers

摘要: Atlas Control Toolkit Build-in providers 阅读全文

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

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

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

摘要: 在金钱和美女面前保持一颗平常心! 阅读全文

posted @ 2010-01-01 00:00 阿福 阅读(60) 评论(0) 推荐(0) 编辑
How&nbsp;to&nbsp;use&nbsp;virtual&nbsp;path&nbsp;providers&nbsp;to&nbsp;dynamically&nbsp;load&nbsp;and&nbsp;compile&nbsp;content&nbsp;from&nbsp;virtual&nbsp;paths&nbsp;in&nbsp;

摘要: Virtual Path Providers are a new feature in ASP.NET 2.0 that can be used to create applications similar to Microsoft SharePoint Portal Server, where the content is stored in a database instead of on... 阅读全文

posted @ 2010-01-01 00:00 阿福 阅读(78) 评论(0) 推荐(0) 编辑
ASP.NET:How&nbsp;a&nbsp;page&nbsp;handles&nbsp;requests.

摘要: Figure below illustrates two incoming requests for the same page and shows how the page framework processes these two requests. 阅读全文

posted @ 2010-01-01 00:00 阿福 阅读(92) 评论(0) 推荐(0) 编辑
What&nbsp;is&nbsp;Ajax?

摘要: Here is a good, brief aritcle about Ajax. After reading it, you could get a general idea about Ajax. Ajax, Atlas and Avalon – Part 1 阅读全文

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