【发布时间】:2017-09-20 21:56:48
【问题描述】:
你好,对不起我的英语不好,
我有一个 Asp.Net 应用程序在我添加 Log.Net 框架(登录单个文件)并在线程中添加图片生成之前运行良好。
我会随机丢失所有会话变量。
我尝试不使用 Log4Net 登录(在配置文件中)。
我在 global.asax 中添加了登录 session_end 以了解为什么应用程序池回收被午餐,我得到了这个堆栈跟踪:
shutDownMessage=CONFIG change
HostingEnvironment initiated shutdown
HostingEnvironment a provoqué un arrêt.
_shutDownStack= à System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
à System.Environment.get_StackTrace()
à System.Web.Hosting.HostingEnvironment.InitiateShutdownInternal()
à System.Web.Hosting.HostingEnvironment.InitiateShutdownWithoutDemand()
à System.Web.HttpRuntime.ShutdownAppDomain(String stackTrace)
à System.Web.Configuration.HttpConfigurationSystem.OnConfigurationChanged(Object sender, InternalConfigEventArgs e)
à System.Configuration.Internal.InternalConfigRoot.OnConfigChanged(InternalConfigEventArgs e)
à System.Configuration.BaseConfigurationRecord.OnStreamChanged(String streamname)
à System.Web.Configuration.WebConfigurationHostFileChange.OnFileChanged(Object sender, FileChangeEvent e)
à System.Web.DirectoryMonitor.FireNotifications()
à System.Web.Util.WorkItem.CallCallbackWithAssert(WorkItemCallback callback)
à System.Web.Util.WorkItem.OnQueueUserWorkItemCompletion(Object state)
à System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
à System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
à System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
à System.Threading.ThreadPoolWorkQueue.Dispatch()
à System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
ShutDownMessage 是“配置更改”,但我没有对配置文件进行任何更改,即使在 bin 文件夹中也是如此。
我唯一做的就是在网站的特定文件夹中删除和创建图片。
即使我没有对 bin 文件夹进行任何更改,Asp.Net 文件更改通知也会导致启动 App Recycling 吗?
提前感谢您的帮助。
【问题讨论】:
标签: asp.net multithreading recycle