예제 #1
0
 /// <summary>
 /// 修改global.asax文件
 /// </summary>
 /// <returns></returns>
 private static bool TryWriteGlobalAsax()
 {
     try
     {
         File.SetLastWriteTimeUtc(IoHelper.GetMapPath("~/global.asax"), DateTime.UtcNow);
         return(true);
     }
     catch
     {
         return(false);
     }
 }
예제 #2
0
 /// <summary>
 /// 修改web.config文件
 /// </summary>
 /// <returns></returns>
 private static bool TryWriteWebConfig()
 {
     try
     {
         File.SetLastWriteTimeUtc(IoHelper.GetMapPath("~/web.config"), DateTime.UtcNow);
         return(true);
     }
     catch
     {
         return(false);
     }
 }