加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

asp.net – 什么是global.asax用于?

发布时间:2020-12-15 22:56:35 所属栏目:asp.Net 来源:网络整理
导读:ASP.NET中global.asax的用途是什么? 解决方法 The Global.asax file,also known as the ASP.NET application file,is an optional file that contains code for responding to application-level and session-level events raised by ASP.NET or by HTTP mo
ASP.NET中global.asax的用途是什么?

解决方法

The Global.asax file,also known as the ASP.NET application file,is an optional file that contains code for responding to application-level and session-level events raised by ASP.NET or by HTTP modules. The Global.asax file resides in the root directory of an ASP.NET application. At run time,Global.asax is parsed and compiled into a dynamically generated .NET Framework class derived from the HttpApplication base class. ASP.NET is configured so that any direct URL request for the Global.asax file is automatically rejected; external users cannot download or view the code in it.
The Global.asax file is optional. You create it only if you want to handle application or session events.

(MSDN http://msdn.microsoft.com/en-us/library/2027ewzw%28v=vs.100%29.aspx)

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读