ASP.NET 黄屏死机 - 它从哪里获取堆栈跟踪?

发布于 2024-10-23 14:25:32 字数 1946 浏览 3 评论 0原文

我在我的应用程序中设置了一个远程处理类型,在其中我避免了 TargetInitationExceptions 并获取内部异常。我在 Exception 类上调用内部 PrepForRemoting 方法,以保留调用方法的堆栈跟踪。

这似乎正确构造了堆栈跟踪属性:

“\r\n服务器堆栈跟踪:\r\n

位于 ZBooking.Environment.Services.BookingService。<>c_DisplayClass9`1.b_5(BookingSlot p) 中 C:\dev\ZBookings\core\ZZBookings.Services\BookingService.cs:第 79 行\r\n

位于 System.Linq.Enumerable.All[TSource](IEnumerable'1 源,Func'2 谓词)\r\n

在 ZBookings.BookingService.MoveBooking[TBookingType](Int32 bookingId, >IEnumerable`1 bookingSlots) 中 C:\dev\ZBooking.Client\core\ZBookings.Services\BookingService.cs:第 79 行\r\n\r\n

在 [0] 处重新抛出异常:\r\n at ZBookings.BookingService。<>c_DisplayClass9`1.b_5(BookingSlot p) in C:\dev\ZBookings\core\ZBookings.Services\BookingService.cs:第 79 行\r\n

位于 System.Linq.Enumerable.All[TSource](IEnumerable'1 源,Func'2 谓词)\r\n

在 ZBookings.BookingService.MoveBooking[TBookingType](Int32 bookingId, IEnumerable`1 bookingSlots) 中 C:\dev\ZBookings\core\ZBookings.Services\BookingService.cs:第 79 行”

但是,当标准 ASP.NET 黄屏显示时,它是:

[NullReferenceException:未将对象引用设置为对象的实例。] C:\dev\ZBooking\core\ZBooking.ApplicationServices\MethodMarshaller.cs 中的 ZBooking.ApplicationServices.MethodMarshaller.Invoke(Delegate del, ZipIdentity zipIdentity, Object[] args):147 C:\dev\ZBooking\core\ZBooking.ApplicationServices\MethodMarshaller.cs 中的 ZBooking.ApplicationServices.MethodMarshaller.Invoke(Delegate del, ZipIdentity zipIdentity, Object[] args):105 C:\dev\ZBooking\core\ZBooking.ApplicationServices\MethodMarshaller.cs:72 中的 ZBooking.ApplicationServices.MethodMarshaller.Call(Func'3 del, T1 arg1, T2 arg2, ZipIdentity zipIdentity) ...等等

对 Global.asax 中的 Application_Error 调用 Server.GetLastError(); 显示正确的堆栈跟踪。黄色屏幕堆栈跟踪来自哪里?

I have a remoting-type set up within my application where I avoid TargetInvocationExceptions and grab the inner exception. I invoke the internal PrepForRemoting method on the Exception class to preserve the stack trace from the invoked method.

This appears to construct the stack trace property correctly:

"\r\nServer stack trace: \r\n

at ZBooking.Environment.Services.BookingService.<>c_DisplayClass9`1.b_5(BookingSlot p) in
C:\dev\ZBookings\core\ZZBookings.Services\BookingService.cs:line 79\r\n

at System.Linq.Enumerable.All[TSource](IEnumerable'1 source, Func'2 predicate)\r\n

at ZBookings.BookingService.MoveBooking[TBookingType](Int32 bookingId, >IEnumerable`1 bookingSlots) in
C:\dev\ZBooking.Client\core\ZBookings.Services\BookingService.cs:line 79\r\n\r\n

Exception rethrown at [0]: \r\n at ZBookings.BookingService.<>c_DisplayClass9`1.b_5(BookingSlot p) in
C:\dev\ZBookings\core\ZBookings.Services\BookingService.cs:line 79\r\n

at System.Linq.Enumerable.All[TSource](IEnumerable'1 source, Func'2 predicate)\r\n

at ZBookings.BookingService.MoveBooking[TBookingType](Int32 bookingId, IEnumerable`1 bookingSlots) in
C:\dev\ZBookings\core\ZBookings.Services\BookingService.cs:line 79"

However, when this is displayed by the standard ASP.NET yellow screen it is:

[NullReferenceException: Object reference not set to an instance of an object.]
ZBooking.ApplicationServices.MethodMarshaller.Invoke(Delegate del, ZipIdentity zipIdentity, Object[] args) in C:\dev\ZBooking\core\ZBooking.ApplicationServices\MethodMarshaller.cs:147
ZBooking.ApplicationServices.MethodMarshaller.Invoke(Delegate del, ZipIdentity zipIdentity, Object[] args) in C:\dev\ZBooking\core\ZBooking.ApplicationServices\MethodMarshaller.cs:105
ZBooking.ApplicationServices.MethodMarshaller.Call(Func'3 del, T1 arg1, T2 arg2, ZipIdentity zipIdentity) in C:\dev\ZBooking\core\ZBooking.ApplicationServices\MethodMarshaller.cs:72
...etc.

Calling Server.GetLastError(); on Application_Error in Global.asax shows the correct stack trace. Where is the yellow screen stack trace coming from?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

若沐 2024-10-30 14:25:33

ASP.NET 的黄屏死机通过构造 < 来获取堆栈跟踪code>StackTrace 来自异常。它使用 StackTrace(Exception, Boolean)< /a> 构造函数。然后,它通过遍历提供的 StackFrame 对象来转储堆栈通过 StackTrace 对象。它不使用 Exception.StackTrace 属性。

ASP.NET's yellow screen of death gets the stack trace by constructing a StackTrace from the exception. It does this using the StackTrace(Exception, Boolean) constructor. It then dumps the stack by walking the StackFrame objects supplied by the StackTrace object. It does not use the Exception.StackTrace property.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文