ASP.NET MVC 应用程序自行重新启动

发布于 2024-08-17 02:39:28 字数 334 浏览 2 评论 0原文

我们遇到一个问题,我们的 ASP.NET MVC 应用程序因未知原因重新启动。关闭的原因是

“Bin应用程序目录中的子目录被更改或重命名”。

有问题的文件原来是 C:\Users\Jason\AppData\Local\Temp\Temporary ASP.NET Files\root\f691a68c\a1593a1e\hash\hash.web。

值得注意的是,我们正在 Application_Start 中启动 NServiceBus 客户端,如果我们注释掉该行,我们的 Web 应用程序不会自行重新启动。问题是:1)hash.web 是做什么的,2)这个问题与 NServiceBus 相关吗?

We are encountering an issue where our ASP.NET MVC app is restarting for an unknown reason. The cause of the shut down is

"A subdirectory in the Bin application directory was changed or renamed."

The file in question turned out to be C:\Users\Jason\AppData\Local\Temp\Temporary ASP.NET Files\root\f691a68c\a1593a1e\hash\hash.web.

Something noteworthy is that we are starting up a NServiceBus client in Application_Start and if we comment out that line, our web app doesn't restart itself. The the questions are: 1) What does hash.web do and 2) Is this issue NServiceBus related?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

蘑菇王子 2024-08-24 02:39:28

您在应用程序中使用 log4net 吗?在我们的某些环境中,我们将 log4net 日志文件保存到与应用程序相同的目录(即 bin 目录),这会导致应用程序重新启动。将日志文件移出该目录解决了该问题。

are you using log4net in your application at all? in some of our environments we had log4net logging files to the same directory as the app (i.e. bin directory) and it would cause the application to restart. moving the log files out of that directory resolved the issue.

烟凡古楼 2024-08-24 02:39:28

您需要弄清楚是什么在影响 hash.web 文件:可能的原因是病毒扫描程序。使用进程监视器监视文件。

如果可能,请从自动病毒扫描以及 Web 内容目录中排除临时 ASP.NET 文件目录和子目录。

在 .NET 2.0 中,可以通过 HKLM\Software\Microsoft\ASP.NET\FCNMode 键禁用 FileChangesMonitoring,值为 1 将禁用文件更改监视。禁用此功能的缺点是,如果禁用它,则在更改 web.config 等时应用程序将不会重新启动。

感兴趣的:ASP.NET 文件更改通知,确切监视哪些文件和目录?

You need to figure out what is touching the hash.web file: a likely cause is a virus scanner. Monitor the file with Process Monitor.

If possible, exclude the Temporary ASP.NET Files directory and subdirectories from automatic virus scanning as well as the web content directories.

In .NET 2.0 it is possible to disable FileChangesMonitoring through the HKLM\Software\Microsoft\ASP.NET\FCNMode key, a value of 1 will disable file change monitoring. The drawback of disabling this is that if you disable it, the application will not restart if you change web.config etc.

Of Interest: ASP.NET File Change Notifications, exactly which files and directories are monitored?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文