08 2023 档案

摘要:public class Check : IHttpHandler { public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; string sendStr = st 阅读全文
posted @ 2023-08-30 15:58 博客YS 阅读(138) 评论(0) 推荐(0) 编辑
摘要:1、适用客户端程序,如winform,WPF程序; 目的:当有的功能模块代码,没有漏掉异常捕获,会导致整个程序自动异常关掉(UI线程),为了确保整个程序正常运行,即使别人写的模块有问题我也能正常运行,并能捕获异常,保证UI线程健壮; 增加整个UI线程异常捕获 /// <summary> /// 应用 阅读全文
posted @ 2023-08-21 14:40 博客YS 阅读(20) 评论(0) 推荐(0) 编辑
摘要:创建全局应用程序类Global.asax, 在方法Application_BeginRequest 并添加如下代码:利用替换的方式实现效果 string path = Request.Url.ToString(); path = Request.Url.LocalPath.ToString(); i 阅读全文
posted @ 2023-08-02 11:30 博客YS 阅读(92) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示