The Global.asax file, also known as the ASP.NET application file, is an optional file that contains code for responding to application-level events...
全球。asax文件,也称为ASP。NET应用程序文件,是一个可选文件,包含响应应用程序级事件的代码…
The ASP.NET Global.asax file can coexist with the ASP Global.asax file. You can create a Global.asax file either in a WYSIWYG designer, in Notepad, or as a compiled class that you deploy in your application's \Bin directory as an assembly. However, in the latter case, you still need a Global.asax file that refers to the assembly.
ASP。净全球。asax文件可以与ASP全局文件共存。asax文件。您可以创建一个全局变量。asax文件可以是在WYSIWYG设计器、记事本中,也可以是作为程序集部署在应用程序的\Bin目录中的编译类。然而,在后一种情况下,您仍然需要一个全局变量。asax文件,指的是程序集。
When you save changes to an active Global.asax file, the ASP.NET page framework detects that the file has been changed. It completes all current requests for the application, sends the Application_OnEnd event to any listeners, and restarts the application domain. In effect, this reboots the application, closing all browser sessions and flushing all state information. When the next incoming request from a browser arrives, the ASP.NET page framework reparses and recompiles the Global.asax file and raises the Application_OnStart event.
将更改保存到活动全局变量时。asax文件,ASP。NET页面框架检测文件已被更改。它完成对应用程序的所有当前请求,将Application_OnEnd事件发送到任何侦听器,并重新启动应用程序域。实际上,这将重新启动应用程序,关闭所有浏览器会话并刷新所有状态信息。当来自浏览器的下一个传入请求到达时,ASP。NET页面框架修复并重新编译全局。asax文件并引发Application_OnStart事件。