摘要: jquery uploadify在ie下可以正常上传,在实现异步上传的时候,每一个文件在上传时都会提交给服务器一个请求。每个请求都需要安全验证,session 和cookie的校验。是的,就是这样。由于jquery uploadify是借助flash来实现上传的,每一次向后台发送数据流请求时,ie会自动把本地cookie存储捆绑在一起发送给服务器。但 firefox、chrome不会这样做,他们会认为这样不安全。首先需要对global.asxa添加如下内容 1 protected void Application_BeginRequest(object sender, Eve... 阅读全文
posted @ 2013-01-22 14:22 怪獣 阅读(10555) 评论(2) 推荐(2) 编辑
摘要: 由于更新了update1导致EFPowertools 反向工程报“0x80070057”的错误解决方案如下:找到 Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\Entity Framework Tools\Templates\Includes\EF.Utility.CS.ttinclude删除第一行 (<#@ CleanupBehavior Processor="T4VSHost" CleanupAfterProcessingTemplate=&quo 阅读全文
posted @ 2013-01-22 13:56 怪獣 阅读(445) 评论(0) 推荐(0) 编辑
摘要: jquery.tagsinput.js官方链接下载根据jQuery Tags Input Plugin 1.3.3添加如下功能·新增getTags()方法·新增4个options[maxCount:0,lowerCase:false,upperCase:false,regex:'']maxCount:默认值0,不限制tag数量,设定需要限定tag最大个数值lowerCase:默认值false,若为true,tag转小写upperCase:默认值false,若为true,tag转大写regex:默认值空,可设置自定义验证/^[\u4E00-\u9FA5\w\d 阅读全文
posted @ 2012-11-09 03:43 怪獣 阅读(5139) 评论(0) 推荐(0) 编辑
摘要: 1 public static class Pathing 2 { 3 [DllImport("mpr.dll", CharSet = CharSet.Unicode, SetLastError = true)] 4 public static extern int WNetGetConnection( 5 [MarshalAs(UnmanagedType.LPTStr)] string localName, 6 [MarshalAs(UnmanagedType.LPTStr)] StringBuild... 阅读全文
posted @ 2012-10-24 13:04 怪獣 阅读(2003) 评论(3) 推荐(0) 编辑
摘要: 尝试在WebApi中使用Ninject进行依赖注入 1 public class AdminController : ApiController 2 { 3 [Inject] 4 public IAdminService AdminService { get; set; } 5 6 // GET api/admin 7 public IEnumerable<Admin> Get() 8 { 9 return AdminService.Admins();10 ... 阅读全文
posted @ 2012-08-30 22:00 怪獣 阅读(2683) 评论(0) 推荐(3) 编辑