⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 global.asax

📁 asp.net技术内幕的书配源码
💻 ASAX
字号:
<%@ Page Language="C#" %>
<%@ Import Namespace="System.Diagnostics" %>

<Script Runat="Server">

protected void Application_Error(Object sender, EventArgs e)
{
	string strErrorText;
	EventLog objLog;

	strErrorText = "ERROR IN " + Request.Path;
	strErrorText += "\r\n\r\n" + "ERROR:";
	strErrorText += Server.GetLastError.InnerException.Message;
	strErrorText += "\r\n\r\n" + "STACK TRACE:";
	strErrorText += Server.GetLastError.InnerException.StackTrace;

	objLog = new EventLog();
	objLog.Source = "My ASP.NET App";
	objLog.WriteEntry( strErrorText, EventLogEntryType.Error );
}

</Script>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -