在我的应用程序中设置了远程处理类型,避免使用TargetInvocationExceptions并获取内部异常。我调用Exception类上的内部Exception方法,以保留被调用方法中的堆栈跟踪。ZBookings.BookingService.MoveBooking in C:\dev\ZBookings\core\ZBookings.Services\BookingService.cs:line 79“
但是,当标准的ASP.NET黄色屏幕显示时,如下所示
我有一个ASP.NET托管的WCF应用程序。目前,它显示了一个403.14 - Forbidden: The Web server is configured to not list the contents of this directory.我想换成更友好的东西。但是,我想向localhost显示一个与其他访问者不同的页面。例如,localhost页面应该包含关于在文档中查找位置的更多信息。
在我的web.config中,我包含了:现在,死亡的黄色屏幕不再显示。我想我必须在我的控制器方法或类本身中包含HandleError属性:public ActionResult About() throw new Exception("Just an exception");
return View();