0
votes

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.

1
Can you show the complete web.config and modules have installed on IIS? It is better to show the log in event viewer so that I can find the issue. When you reboot the server, did DNN start normally? - Bruce Zhang
The full web.config (minus connection strings) is here: pastebin.com/GpqB5H0U. - kevinlb
Here's the error in event viewer: pastebin.com/paUvF0he - kevinlb
The stack-trace says that FormsAuthenticationModule is complaining. How do you have that configured in your project? I'm guessing a systemwide Windows Update to .NET Framework broke an assumption in DNN (DNN is ancient, anyway). - Dai
I think you should update to .NET Framework 4.8 before continuing any other line of investigation - I'm willing to bet a dollar or two that the issue is related to the SameSite cookie patch Microsoft shipped to .NET Framework this year. - Dai

1 Answers

0
votes

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?