摘要: Action属性,权限设定属性 [AttributeUsage(AttributeTargets.Method, Inherited = true, AllowMultiple = false)] public class PurviewEnumAttribute : Attribute { pub 阅读全文
posted @ 2017-08-21 18:06 卓扬 阅读(915) 评论(0) 推荐(1) 编辑
摘要: MVC过滤器 一般的过滤器执行顺序 当同时在Controller和Action中都设置了过滤器后,执行顺序一般是由外到里,即“全局”->“控制器”->“行为” 因为异常是从里往外抛,因次异常的处理顺序则刚好相反,一般是由里到外,即“行为”->“控制器”->“全局” 系统自带的异常处理我们习惯使用的过 阅读全文
posted @ 2017-08-21 18:04 卓扬 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 服务接收端: public bool AppendChunk(string serverFileName, byte[] buff, long offset, out string errMsg) { errMsg = string.Empty; int maxSize =1024 * 1024;/ 阅读全文
posted @ 2017-08-21 18:01 卓扬 阅读(821) 评论(0) 推荐(0) 编辑
摘要: 客户端UDP发送消息至服务器端服务器IP:192.168.1.114服务器端口:2014客户端 Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); IPAddress 阅读全文
posted @ 2017-08-21 17:53 卓扬 阅读(349) 评论(0) 推荐(0) 编辑