上一页 1 ··· 6 7 8 9 10 11 12 13 下一页
摘要: MVC3缓存之一:使用页面缓存在MVC3中要如果要启用页面缓存,在页面对应的Action前面加上一个OutputCache属性即可。我们建一个Demo来测试一下,在此Demo中,在View的Home目录下的Index.cshtml中让页面输入当前的时间。[csharp] view plaincopy... 阅读全文
posted @ 2014-04-14 10:48 秋意了了 阅读(332) 评论(0) 推荐(0) 编辑
摘要: 跨域攻击---自然来路页面和目标页面不在同一个域下,所以直接判断来路域和当前自己的域就可以了。可以广泛应用于表单提交,ajax调用或者某些不想让用户直接输入网址看到的页面[csharp] view plaincopy01.using System; 02.using System.Collecti... 阅读全文
posted @ 2014-04-14 10:45 秋意了了 阅读(470) 评论(0) 推荐(0) 编辑
摘要: 代码顺序为:OnAuthorization-->AuthorizeCore-->HandleUnauthorizedRequest 如果AuthorizeCore返回false时,才会走HandleUnauthorizedRequest 方法,并且Request.StausCode会返回401,40... 阅读全文
posted @ 2014-04-14 10:41 秋意了了 阅读(1050) 评论(0) 推荐(0) 编辑
摘要: IntroductionIn MVC the default method to perform authorization is hard coding the "Authorize" attribute in the controllers, for each action, in this a... 阅读全文
posted @ 2014-04-14 10:06 秋意了了 阅读(383) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/bomo/p/3309766.htmlhttp://www.cnblogs.com/leonwang/archive/2013/03/05/2944575.htmlhttp://www.cnblogs.com/ldp615/archive/2010/10/27/asp-net-mvc-forms-authentication-roles-authorization-demo.htmlhttp://www.cnblogs.com/zxjyuan/archive/2009/08/21/1551196.htmlhttp://blog.sina.com.c 阅读全文
posted @ 2014-04-12 22:15 秋意了了 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 一、mvc设置ueditor的net文件夹下的Uploader.cs文件和Config.cs的生成操作属性默认是“编译”,只需要将这个文件的生成操作属性改为“内容”,上传图片的功能就可以正常成功使用了!另:如果你的服务器Framework版本低于4.0,那么你需要将net文件下的webconfig文件删除掉,才能正常使用ueditor!二、ueditor.config.js三、潜在风险[HttpPost][ValidateInput( false )]public ActionResult Create( FormCollection collection ) 阅读全文
posted @ 2014-04-11 16:09 秋意了了 阅读(278) 评论(0) 推荐(0) 编辑
摘要: protected void Application_Start() { AreaRegistration.RegisterAllAreas(); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); log4ne... 阅读全文
posted @ 2014-04-10 22:07 秋意了了 阅读(208) 评论(0) 推荐(0) 编辑
摘要: ... 阅读全文
posted @ 2014-04-10 21:57 秋意了了 阅读(239) 评论(0) 推荐(0) 编辑
摘要: 原来的一篇文章,今天用 WLW 转到页面上,原文章以及附件下载地址:http://zhq.ahau.edu.cn/blog/article.asp?id=366http://www.cnblogs.com/wenanry/archive/2008/07/04/1235198.htmlhttp://logging.apache.org/log4net/release/config-examples.html--------------------------------------------------------------------------------log4net为Apache 的 阅读全文
posted @ 2014-04-10 21:47 秋意了了 阅读(236) 评论(0) 推荐(0) 编辑
摘要: 你可以通过使用下列方法指定的格式或模板的模型属性:将DisplayFormat属性应用到模型中的属性。例如,以下代码会导致要没有时间显示的日期:[DisplayFormat(DataFormatString="{0:d}")] //[DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)]public DateTime ReleaseDate{get;set;}通过将DataType属性应用到模型中的属性和指定数据类型。例如,以下代码会导致要没有时间 阅读全文
posted @ 2014-04-10 11:03 秋意了了 阅读(773) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 下一页