1

更新/修复

好吧,我做了两件事似乎可以奏效

  1. 将我的应用程序池的高级设置>>进程模型>>身份更改为“网络服务”
  2. 指示它使用临时文件夹在站点 .net 编译设置上进行编译。仍然每隔一段时间重新启动一次,但会话不会丢失,所有浏览器仍然可以连接。

这也有效:http ://www.aaronblake.co.uk/blog/2009/09/28/bug-fix-application-restarts-on-directory-delete-in-asp-net/

我正在 asp.net 4 中构建我的网络应用程序,并且很难弄清楚为什么我的连接在大约一分钟后超时(当浏览到 - 使用 IIS 7 托管时)。我被告知这可能是由于正在编辑 web.config/目录,因此应用程序被卸载/重新启动并且页面消失了。我不知道我编写的任何代码都明确地编辑了 bin 上的任何内容。

我正在连接到 sql(通过表适配器或 SQLConnection 类),但我认为这不会做任何事情。我也使用作为脚本运行的按钮。

我已在 IIS 中将重新启动配置更改选项设置为 false 仍然无济于事..

编辑

以下是关闭的一些事件日志。

_shutDownMessage=Change Notification for critical directories.
bin dir change or directory rename
HostingEnvironment initiated shutdown
HostingEnvironment caused shutdown
Change Notification for critical directories.
bin dir change or directory rename
Change Notification for critical directories.
bin dir change or directory rename
Change Notification for critical directories.
bin dir change or directory rename

_shutDownStack=   at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
   at System.Environment.get_StackTrace()
   at System.Web.Hosting.HostingEnvironment.InitiateShutdownInternal()
   at System.Web.Hosting.HostingEnvironment.InitiateShutdownWithoutDemand()
   at System.Web.HttpRuntime.ShutdownAppDomain(String stackTrace)
   at System.Web.HttpRuntime.OnCriticalDirectoryChange(Object sender, FileChangeEvent e)
   at System.Web.FileChangesMonitor.OnCriticaldirChange(Object sender, FileChangeEvent e)
   at System.Web.DirectoryMonitor.FireNotifications()
   at System.Web.Util.WorkItem.CallCallbackWithAssert(WorkItemCallback callback)
   at System.Web.Util.WorkItem.OnQueueUserWorkItemCompletion(Object state)
   at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

我一直在思考为什么 bin 会被改变。完全不知所措,我们写的任何东西都没有写任何东西/故意改变任何东西

4

0 回答 0