Elmah YSOD: The given assembly name or codebase was invalid (Exception from HRESULT: 0x80131074)

67 views
Skip to first unread message

Chris Van Oort

unread,
Apr 11, 2018, 1:45:53 PM4/11/18
to ELMAH

Hi there,

I'm running Elmah with packages from Nuget in an ASP.NET MVC app targeting .NET 4.6.2

  • elmah v1.2.2
  • Elmah.Contrib.WebApi v1.0.10.25
  • elmah.corelibrary v1.2.2

When I navigate to ~/elmah.axd I encounter a YSOD (yellow screen of death) instead of the usual elmah page loading:

Server Error in '/' Application.
The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.IO.FileLoadException: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 


[FileLoadException: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)]
   System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type) +0
   System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName) +70
   System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +40
   System.Type.GetType(String typeName, Boolean throwOnError) +34
   Elmah.SimpleServiceProviderFactory.CreateFromConfigSection(String sectionName) +162
   Elmah.ErrorLog.GetDefaultImpl(HttpContext context) +134
   Elmah.ServiceContainer.GetService(Type serviceType) +49
   Elmah.ServiceCenter.FindService(Object context, Type serviceType) +25
   Elmah.ServiceCenter.GetService(Object context, Type serviceType) +31
   Elmah.ErrorLog.GetDefault(HttpContext context) +22
   Elmah.ErrorPageBase.get_ErrorLog() +32
   Elmah.ErrorLogPage.OnLoad(EventArgs e) +308
   System.Web.UI.Control.LoadRecursive() +130
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2839

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.2633.0

It's working in our master branch of our project, but my branch (where I've been updating Nuget packages) is running into issues. I've confirmed:

  • Web.config, and the csproj file entries for Elmah are exactly the same as the master branch
  • the csproj references to the DLL's match up properly
  • the dll's exist on disk and are making it to the proper bin folder for the project

Any ideas how I can solve this?

Best,
Chris

Chris Van Oort

unread,
Apr 11, 2018, 3:13:18 PM4/11/18
to ELMAH
If anyone stumbles across this, the discussion is here: https://github.com/elmah/Elmah/issues/434
Reply all
Reply to author
Forward
0 new messages