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

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:

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

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.

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

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?


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x