DNN Server - System.Runtime.InteropServices.COMException: The data is invalid

0

One of our production servers running DNN (DotNetNuke) recently stopped working after being rebooted. All requests now give the following error:

[COMException (0x8007000d): The data is invalid. (Exception from HRESULT: 0x8007000D)]
   System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) +0
   System.Web.Handlers.AssemblyResourceLoader.EnsureHandlerExistenceChecked() +340
   System.Web.Handlers.AssemblyResourceLoader.IsValidWebResourceRequest(HttpContext context) +15
   System.Web.Security.FormsAuthenticationModule.OnEnter(Object source, EventArgs eventArgs) +300

   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +139
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +195
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +88

The machine is running Windows Server 2012/IIS8.5/ASP.NET 4.5.

I've searched for the error and seen suggestions that the web.config may have malformed XML, so I checked and it's fine, and hasn't changed in over a year.

I've also seen suggestions that we install the IIS URL Rewrite Module. I tried that and still no luck, and the site has been working for years without it installed.

The full web.config (minus connection strings) is here: pastebin.com/GpqB5H0U.

Here's the error in event viewer:

enter image description here

Or as text: pastebin.com/paUvF0he

Since the problems seemed to be triggered by a reboot I reverted the server to a backup from a week earlier, and it worked great until the next time it was rebooted, and the error appeared again. I checked and there haven't been any windows updates or changes to group policy that would have affected it.

Any ideas would be greatly appreciated.

c#
asp.net
iis
dotnetnuke
asked on Stack Overflow Dec 3, 2020 by kevinlb • edited Dec 4, 2020 by kevinlb

1 Answer

0

So I finally fixed it and I'll post the solution here on the off chance it helps someone else, though I suspect it was something unique to our setup.

@dai's comments led me to look at webresource.axd since it was in a comment in the EnsureHandlerExistenceChecked() method, and I discovered that somehow a folder called webresource.axd with its own web.config file had been created in the website's root folder. It didn't serve any purpose that I could see so I deleted the folder and its contents and suddenly everything started working.

Thanks everyone who responded. @dai do you want to post your comments as an answer so I can give you credit for finding the solution?

answered on Stack Overflow Dec 4, 2020 by kevinlb

User contributions licensed under CC BY-SA 3.0