Back to "التقاط جميع الأخطاء في تطبيق ASP.NET"

This is a viewer only at the moment see the article on how this works.

To update the preview hit Ctrl-Alt-R (or ⌘-Alt-R on Mac) or Enter to refresh. The Save icon lets you save the markdown file to disk

This is a preview from the server running through my markdig pipeline

ASP.NET C# Imported mostlylucidcouk Software Development

التقاط جميع الأخطاء في تطبيق ASP.NET

Wednesday, 12 May 2004

حسنا, أدرك أن الجميع على الأرجح ووالدته / أمها تعرف هذا بالفعلMSC2 لكن إذا أردت تسجيل جميع الأخطاء في تطبيق ASPM SK3NETMスク4 أبسط طريقة أكتشفتها لفعل ذلك هو في الـ Global


protected void Application_OnError(object sender, EventArgs e)
	{
		Exception ex = Server.GetLastError();
		if ( ex is HttpException )
		{
			if (((HttpException)ex).GetHttpCode() == 404)
				return;
		}     
		ExceptionManager.Publish(ex);

	}

في هذه الحالة , ExceptionManager هو كتلة تطبيق مايكروسوفت إدارة الاستثناء... يمكنك ( وبامكانك حقاً ) أن تستخدم هذا بالتزامن مع CustomError. السبب في أنني أفعل ذلك هنا هو أنني أفضل أن أجعل صفحتي الخطأ مسطحة html فقط فكرت, سأقوم بنشر بعض البرمجة التي ترسل لك أخطاء باستخدام EMAB ....

logo

© 2026 Scott Galloway — Unlicense — All content and source code on this site is free to use, copy, modify, and sell.