Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
StopMonitorFolderChange()
End Sub
Private Sub StopMonitorFolderChange()
Dim p As System.Reflection.PropertyInfo = GetType(System.Web.HttpRuntime).GetProperty("FileChangesMonitor", _
System.Reflection.BindingFlags.NonPublic Or System.Reflection.BindingFlags.[Public] Or System.Reflection.BindingFlags.[Static])
Dim o As Object = p.GetValue(Nothing, Nothing)
Dim f As System.Reflection.FieldInfo = o.[GetType]().GetField("_dirMonSubdirs", _
System.Reflection.BindingFlags.Instance Or System.Reflection.BindingFlags.NonPublic Or System.Reflection.BindingFlags.IgnoreCase)
Dim monitor As Object = f.GetValue(o)
Dim m As System.Reflection.MethodInfo = monitor.[GetType]().GetMethod("StopMonitoring", _
System.Reflection.BindingFlags.Instance Or System.Reflection.BindingFlags.NonPublic)
m.Invoke(monitor, New Object() {})
End Sub
Reference: