ASP.NET 程序中刪除文件夾導(dǎo)致session失效問題的解決辦法分享
在Global中 Application_Start 添加
如:
void Application_Start(object sender, EventArgs e)
{
//在應(yīng)用程序啟動(dòng)時(shí)運(yùn)行的代碼
System.Reflection.PropertyInfo p = typeof(System.Web.HttpRuntime).GetProperty("FileChangesMonitor", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static);
object o = p.GetValue(null, null);
System.Reflection.FieldInfo f = o.GetType().GetField("_dirMonSubdirs", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.IgnoreCase);
object monitor = f.GetValue(o);
System.Reflection.MethodInfo m = monitor.GetType().GetMethod("StopMonitoring", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
m.Invoke(monitor, new object[] { });
}
相關(guān)文章
Win7安裝Visual Studio 2015失敗的解決方法
這篇文章主要為大家詳細(xì)介紹了Win7安裝Visual Studio 2015失敗的解決方案,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2017-03-03
.net 像hao123的快捷郵箱登陸的實(shí)現(xiàn)代碼
.net實(shí)現(xiàn)的像hao123的快捷郵箱登陸的代碼,需要的朋友可以參考下。2010-03-03
一個(gè)ASP.NET的MYSQL的數(shù)據(jù)庫操作類自己封裝的
這篇文章主要介紹了一個(gè)ASP.NET的MYSQL的數(shù)據(jù)庫操作類自己封裝的,在數(shù)據(jù)庫操作類中的連接字符串中記得加上charset=utf8 需要的朋友可以參考下2014-08-08
"PageMethods未定義"或"對象不支持此屬性或方法"解決方法分享
PageMethods未定義或?qū)ο蟛恢С执藢傩曰蚍椒ń鉀Q方法,需要的朋友可以參考下。2010-12-12
合并兩個(gè)DataSet的數(shù)據(jù)內(nèi)容的方法
合并兩個(gè)DataSet的數(shù)據(jù)內(nèi)容的方法,需要的朋友可以參考一下2013-03-03

