c# - 为什么突然出现app_offline.htm文件?

标签 c# asp.net

我已经使用 ASP.NET 开发 Web 应用程序有一段时间了,没有什么大的惊喜,直到今天早上我遇到了一个隐藏在应用程序目录根目录中的 app_offline.htm 文件。我通过其他地方的研究了解了这样的文件是如何工作的,但我无法理解该文件是如何出现的。

最佳答案

看起来好像这是 Visual Studio 的一个功能。

SQL Server 2005 express edition does not support multiple processes. Only single process can access database at a time. So when a database is accessed through visual studio, ASP.net runtime cannot access the database. This will result into the internal server error. To prevent this, VS 2005 places app_offline.htm file in the application's root directory. The file contain above message. This causes ASP.net to put the application in offline mode. Please note the accessing database means opening any component of the database (I.e. table, view, stored procedure etc.) into the design window. When design window is closed, VS 2005 removes app_offline.htm file making the application in onliner mode again.

Putting ASP.net Application In Offline Mode Using app_offline.htm

关于c# - 为什么突然出现app_offline.htm文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20285330/

相关文章:

c# - 访问 ASP.NET Core 中间件中的用户凭据

c# - 将无向图转换为网格

c# - 无法让 Blazor WASM AAD 应用程序角色工作

asp.net - 如何在 IIS 7.0 中允许混合模式身份验证

c# - 如何将列表转换为数据表

c# - asp.net中的后台函数

c# - 如何在 Windows XP 上以管理员身份运行另一个应用程序

c# - 如何在控件具有焦点时使用键盘关闭 WinForm

c# - 将字符串列表转换为json格式

c# - 刷新 DB.designer.cs 文件