摘要: 用户代码未处理 System.InvalidOperationException HResult=-2146233079 Message=未找到具有固定名称“System.Data.SQLite”的 ADO.NET 提供程序的实体框架提供程序。请确保在应用程序配置文件的“entityFramework”节中注册了该提供程序。有关详细信息,请参阅 http://go.micro... 阅读全文
posted @ 2014-09-03 23:07 倚舟笑沧海 阅读(5288) 评论(2) 推荐(0) 编辑
摘要: 修改成这个后解决 @ViewBag.Title - 我的 ASP.NET 应用程序 @Styles.Render("~/Content/css") @Scripts.Render("~/bundles/modernizr") 阅读全文
posted @ 2014-08-24 22:22 倚舟笑沧海 阅读(972) 评论(0) 推荐(0) 编辑
摘要: /// /// 16进制字符转换为byte数组 /// /// 偶数位,由16进制字符[0-9a-fA-F]组成 /// null为转换失败 private byte[] HexStringToBytes(string hexString) { if (string.IsNullOr... 阅读全文
posted @ 2014-08-23 20:45 倚舟笑沧海 阅读(2436) 评论(0) 推荐(0) 编辑
摘要: Get-Package -ListAvailable -Filter Microsoft.JQuery Microsoft.jQuery.Unobtrusive.Ajax –Version 3.2.0 阅读全文
posted @ 2014-08-23 20:29 倚舟笑沧海 阅读(173) 评论(0) 推荐(0) 编辑
摘要: javascript前台代码 C#后台 public ActionResult DecryptAes(string cipher,string key,string iv) { AesManaged aes = new AesManaged(); aes.Key = HexStringToBytes(key); ... 阅读全文
posted @ 2014-08-23 20:26 倚舟笑沧海 阅读(1548) 评论(1) 推荐(0) 编辑
摘要: index.cshtml @using (Ajax.BeginForm("ContentAjax", new AjaxOptions { UpdateTargetId = "pajax" })){ ContentAjax测试 } @Ajax.ActionLink("JsonAjax测试", "JsonAjax", new A... 阅读全文
posted @ 2014-08-13 21:10 倚舟笑沧海 阅读(229) 评论(0) 推荐(0) 编辑
摘要: IMVCPagesinterface IMVCPages { int GetItemsCount(); int GetPageSize(); int GetPagesCount(); /// /// 当前页面索引,用于分页... 阅读全文
posted @ 2014-08-11 21:22 倚舟笑沧海 阅读(706) 评论(0) 推荐(0) 编辑
摘要: 今天用System.Security.Cryptography加密。使用了AesManaged,报错:填充无效,无法移除。分析是解密失败,密文损坏,或者KEY,IV不正确。 using (AesManaged aesAlg = new AesManaged()){ aesAlg.Key = Encoding.Unicode.GetBytes("password"); aesAl... 阅读全文
posted @ 2014-08-11 21:17 倚舟笑沧海 阅读(554) 评论(0) 推荐(0) 编辑
摘要: 加密 static byte[] EncryptBytes_Aes(byte[] plainText, byte[] Key, byte[] IV) { // Check arguments. if (plainText == null || plainText.Length plaintext = new List(); ... 阅读全文
posted @ 2014-08-11 20:51 倚舟笑沧海 阅读(2587) 评论(0) 推荐(0) 编辑