摘要: How and Where Concurrent Asynchronous I/O with ASP.NET Web APIhttp://www.tugberkugurlu.com/archive/how-and-where-concurrent-asynchronous-io-with-asp-net-web-api 阅读全文
posted @ 2014-03-05 09:30 acles 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 这篇文章把Asp.net MVC的filter介绍的很详细,值得收藏。http://www.dotnet-tricks.com/Tutorial/mvc/b11a280114-Understanding-ASP.NET-MVC-Filters-and-Attributes.html 阅读全文
posted @ 2014-03-04 11:57 acles 阅读(240) 评论(0) 推荐(0) 编辑
摘要: CentOS Mono Nginx 部署 MVC4+WebApi经过几天的折磨,终于在CentOS上成功部署了MVC4+WebApi。Mono上的服务器推荐两种:Jexus(国产高人写的一款很牛的服务器)和Nginx(Fastcgi方式)。本文介绍Nginx如何部署MVC4+WebApi。环境:CentOS 6.4(32、64位)Mono-3.2.1Nginx 1.5.4ASP.NET MVC 4WebApi 1.0一、首先安装一些需要的软件包1、 首先更新CentOS上的软件包:yum –y update。2、 安装一些需要的库:yum -y install gcc gcc-c++ biso 阅读全文
posted @ 2013-09-11 00:00 acles 阅读(10339) 评论(5) 推荐(5) 编辑
摘要: http://blog.leansentry.com/2013/07/the-server-logs-you-need-to-know-to-fix-any-iis-aspnet-error/ 阅读全文
posted @ 2013-07-25 08:53 acles 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 先收藏这篇文章。http://www.strathweb.com/2013/06/ihttpactionresult-new-way-of-creating-responses-in-asp-net-web-api-2/ 阅读全文
posted @ 2013-07-08 09:07 acles 阅读(452) 评论(0) 推荐(0) 编辑
摘要: 在使用WebApi的时候,有时候只想返回JSON;实现这一功能有多种方法,本文提供两种方式,一种传统的,一种作者认为是正确的方法。JSONinWebAPI–theformatterbasedapproach只支持JSON最普遍的做法是:首先清除其他所有的formatters,然后只保留JsonMediaTypeFormatter。有了HttpConfiguration的实例,你将会很简单的清除所有formatters,然后重新添加JsonMediaTypeFormatter。实现代码如下:configuration.Formatters.Clear();configuration.Format 阅读全文
posted @ 2013-06-21 09:51 acles 阅读(51657) 评论(5) 推荐(8) 编辑
摘要: 这篇文章主要介绍使用Nugetpackage中的RazorPDF简单的创建PDF的方法。关于RazorPDF这个NugetPackage由AlNyveldt创建。它内部使用ITextSharp。RazorPDF使用Razor视图引擎创建iTextXML,iTextXML用来生成PDF文件。如果你想了解更多的关于RazorPDF的情况,可以访问:https://www.nuget.org/packages/RazorPDF下面举个例子使用RazorPDF1、首先创建一个MVC项目2、使用Nuget安装RazorPDFPackage。3、创建一个CustomerModel。namespacePDF 阅读全文
posted @ 2013-06-18 10:05 acles 阅读(2545) 评论(3) 推荐(0) 编辑
摘要: use mastergo--检索死锁进程select spid, blocked, loginame, last_batch, status, cmd, hostname, program_namefrom sysprocesseswhere spid in( select blocked from sysprocesses where blocked <> 0 ) or (blocked <>0)kill spid 阅读全文
posted @ 2012-12-18 12:20 acles 阅读(12346) 评论(0) 推荐(0) 编辑
摘要: JQuery.proxy(function,context): 使用context代替function中的context。 比如: var you = { type: "person", test: function(event) { $("#log").append( this.type + " " ); } $("#test").click(you.test);调用这句只有相当于调用: $("#test").click(function(event){ $("#log") 阅读全文
posted @ 2012-11-20 16:41 acles 阅读(24212) 评论(4) 推荐(3) 编辑
摘要: 注意:var与dynamic这两个关键字,只是看起来很相 似,仅此而已!var表示“变量的类型是在编译时决定的”,但是dynamic表 示“变量的类型是在运行时决定的”。因此,dynamic与var具有截然不同的含义。var让 你在初始化变量时少输入一些字,编译器会根据右值来推断出变量的类型。dynamic更厉害,它告诉编译器,根本就别理究竟是啥类型,运行 时再推断不迟。var只能用于局部变量的定义,你不能把类的属性定义成var,也不能把方法的返回值类型或者是参 数类型定义成var。dynamic就没有这些局限了。dynamic类型并没有跳过类型校验,只是 延迟到了运行时。如果在运行时,检测到 阅读全文
posted @ 2012-10-20 16:28 acles 阅读(199) 评论(0) 推荐(0) 编辑