Why, when my application deletes the file folder, does the web application finish its work?
- oneThe code in the studio! What folder? Which app? - Fiztex
- just in c # directory.delete (dir, true). during debugging, the code from the Appication_End procedure in the global.asax application file is then executed: asp.net 3.5 web-application. - megacoder
- oneJust because the application should not be completed. So there is not enough information to answer. - Fiztex
|
1 answer
/|\ / | \ | |
@Fiztex "Just because an application should not terminate. So there is not enough information to answer."
enough
You need to turn off file monitoring in IIS.
PropertyInfo p = typeof(HttpRuntime).GetProperty("FileChangesMonitor", BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static); object o = p.GetValue(null, null); FieldInfo f = o.GetType().GetField("_dirMonSubdirs", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.IgnoreCase); object monitor = f.GetValue(o); MethodInfo m = monitor.GetType().GetMethod("StopMonitoring", BindingFlags.Instance | BindingFlags.NonPublic); m.Invoke(monitor, new object[] { });
|