摘要: 跨域大家都不陌生,但最近一直遇到一个坑,也是自身对ajax和angular的不深入造成,所以记录一笔,下次遇到绕过。 参考过:http://ionichina.com/topic/54f051698cbbaa7a56a49f98,这上面写的很清楚,通过Ionic CLI代理服务器来实现跨域,使用gu 阅读全文
posted @ 2016-07-06 18:47 aweifly 阅读(7035) 评论(3) 推荐(0) 编辑
摘要: 最近正在学习wcf,java平台、android、mac都要调用,今天先弄个java调用测试下。一、创建WCFC# Code namespace YourNamespace{ // 注意: 使用“重构”菜单上的“重命名”命令,可以同时更改代码和配置文件中的接口名“IHello”。 [ServiceContract(Namespace = "http://xxx.com/")] public interface IHello { [OperationContract] string SayHello(string words); ... 阅读全文
posted @ 2013-04-17 18:10 aweifly 阅读(674) 评论(0) 推荐(0) 编辑
2020年2月24日
摘要: SELECT a.table_name 表名, a.ordinal_position 字段序号, a.COLUMN_NAME 字段名, a.DATA_TYPE 数据类型, case a.column_key when 'pri' then 1 else 0 end as 主键, case extra 阅读全文
posted @ 2020-02-24 11:33 aweifly 阅读(308) 评论(0) 推荐(0) 编辑
2013年12月5日
摘要: WCF一、什么是WCF?1、Windows Communication Foundation(WCF)是由微软发展的一组数据通信的应用程序开发接口,可以翻译为Windows通讯接口。它是.NET框架的一部分,由 .NET Framework[1]3.0 开始引入,与 Windows Presentation Foundation及 Windows Workflow Foundation并行为新一代 Windows操作系统以及 WinFX 的三个重大应用程序开发类库。2、很久以前,有一家小商店,靠卖些水果过日子。竞争是如此激烈,为了生存,他们不得不自己进货,把货堆到自己的房间内,如果顾客需要,他 阅读全文
posted @ 2013-12-05 13:36 aweifly 阅读(227) 评论(0) 推荐(0) 编辑
2013年11月20日
摘要: 一、添加模型 public class Account { public int ID { get; set; } [Display(Name = "姓名")] //设置要显示的字段名 [Required(ErrorMessage = "您需要填写{0}")] //设置为必须字段 已经错误提示 [StringLength(50, MinimumLength = 3)] //设置最大长度和最小长度 public string Name { get; set; } [Display... 阅读全文
posted @ 2013-11-20 13:19 aweifly 阅读(500) 评论(0) 推荐(0) 编辑
2013年11月8日
摘要: /// /// 防止开发重定向,篡改returnurl/// /// /// /// private static bool IsLocalUrl(string url){ if (string.IsNullOrEmpty(url)) { return false; } Uri absoluteUri; if (Uri.TryCreate(url, UriKind.Absolute, out absoluteUri)) { return String.Equals(HttpCont... 阅读全文
posted @ 2013-11-08 11:42 aweifly 阅读(363) 评论(0) 推荐(0) 编辑
摘要: HttpCookie cookie;cookie = FormsAuthentication.GetAuthCookie(W3Account, isRemberMe);if (isRemberMe){ cookie.Expires = System.DateTime.Now.AddDays(1);}HttpContext.Current.Response.Cookies.Add(cookie);string targetUrl;targetUrl = FormsAuthentication.GetRedirectUrl(W3Account, isRemberMe);HttpCont... 阅读全文
posted @ 2013-11-08 11:40 aweifly 阅读(460) 评论(0) 推荐(0) 编辑
2013年11月6日
摘要: public class ZipBin { public byte[] bytes; //C#读取压缩文件(将压缩文件转换为二进制 public void GetZipToByte(string inpath) { FileStream fs = new FileStream(inpath, FileMode.Open); bytes = new byte[fs.Length]; int count = Convert.ToInt32(fs.Length); ... 阅读全文
posted @ 2013-11-06 16:47 aweifly 阅读(563) 评论(0) 推荐(0) 编辑
摘要: public class Encrypt { public static byte[] ToEncrypt(string encryptKey, byte[] P_byte_data) { try { byte[] P_byte_key = Encoding.Unicode.GetBytes(encryptKey);//将密钥字符串转换为字节序列 MemoryStream P_Stream_MS = new MemoryStream(); //创建内存流对象... 阅读全文
posted @ 2013-11-06 16:41 aweifly 阅读(1945) 评论(0) 推荐(0) 编辑
2013年11月5日
摘要: select s.[name] + '.' + t.[name] as tablename from sys.tables as t,sys.schemas as s where t.schema_id = s.schema_id and s.[name] = @dbo order by tablename获取指定架构下的所有表SELECT ... 阅读全文
posted @ 2013-11-05 17:17 aweifly 阅读(318) 评论(0) 推荐(0) 编辑
2013年11月4日
摘要: @Ajax.ActionLink("news title a", "Contents",new{id=1}, new AjaxOptions {HttpMethod="Post",InsertionMode= InsertionMode.Replace, UpdateTargetId="news_content" }) @Ajax.ActionLink("news title b", "Contents",new{id=2}, new AjaxOptions {HttpMet 阅读全文
posted @ 2013-11-04 13:03 aweifly 阅读(372) 评论(0) 推荐(0) 编辑