标签: ysod

如何启用程序集绑定日志记录?

我得到了,"无法加载文件或程序集'Bla'或其中一个依赖项.试图加载一个格式不正确的程序."

部分详细信息说:

"WRN:程序集绑定日志记录已关闭.要启用程序集绑定失败日志记录,请将注册表值[HKLM\Software\Microsoft\Fusion!EnableLog](DWORD)设置为1.注意:程序集绑定失败会导致一些性能损失要关闭此功能,请删除注册表值[HKLM\Software\Microsoft\Fusion!EnableLog]."

因此,考虑到这一点可能会让我深入了解为什么我收到上述错误(也许下一个YSOD会包含更明确的信息,说明它失败的原因),我导航到注册表中的那个位置,但是没有这样的键我能看到.它的作用是:

\Fusion 
    (Default)   value not set
    \GACChangeNotification
    \NativeImagesIndex
    \PublisherPolicy
Run Code Online (Sandbox Code Playgroud)

我错过了什么?

registry regedit assemblybinding ysod

49
推荐指数
3
解决办法
15万
查看次数

ASP.NET死黄色屏幕 - 它从哪里获得堆栈跟踪?

我在我的应用程序中设置了远程类型,我避免TargetInvocationExceptions并抓住内部异常.我调用类的内部PrepForRemoting方法Exception来保护调用方法的堆栈跟踪.

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

"\ 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 source,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在ZBookings.BookingService.<> c_ DisplayClass9`1.b _5(BookingSlot p)在C:\ dev\ZBookings\core\ZBookings.Services\BookingService.cs:第79行\ [R \n

在System.Linq.Enumerable.All [TSource](IEnumerable'1 source,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:对象引用未设置为对象的实例.] ZBooking.ApplicationServices.MethodMarshaller.Invoke(Delegate del,ZipIdentity zipIdentity,Object [] args)在C:\ dev\ZBooking\core\ZBooking.ApplicationServices\MethodMarshaller中. cs:147 ZBooking.ApplicationServices.MethodMarshaller.Invoke(Delegate del,ZipIdentity zipIdentity,Object [] args)在C:\ dev\ZBooking\core\ZBooking.ApplicationServices\MethodMarshaller.cs:105 ZBooking.ApplicationServices.MethodMarshaller.Call(Func) '3 del,T1 arg1,T2 arg2,ZipIdentity zipIdentity)在C:\ dev\ZBooking\core\ZBooking.ApplicationServices\MethodMarshaller.cs:72
...等.

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

c# asp.net exception targetinvocationexception ysod

7
推荐指数
1
解决办法
1229
查看次数

httpErrors在本地计算机上显示500错误而不是YSOD

httpErrors在我的网站web.config中使用来处理404错误.在我添加existingResponse="Replace"到节点之前这没有正常工作,但现在我在本地开发机器上没有出现任何黄色的死亡错误屏幕.

<httpErrors errorMode="Custom" existingResponse="Replace" >
      <remove statusCode="404" subStatusCode="-1" />
      <error statusCode="404" prefixLanguageFilePath="" path="/error.aspx?c=404" responseMode="ExecuteURL" />
 </httpErrors>
Run Code Online (Sandbox Code Playgroud)

asp.net error-handling webforms ysod

5
推荐指数
1
解决办法
1197
查看次数