Forms causes site to crash in IIS


We recently upgraded a site from CMS 11 to CMS 12 and the site is up and running fine after a few bugs. Now, a few months after the upgrade and deployment there is another bug that I can't quite wrap my head around and that seemingly has something to do with forms. It causes the w3wp to crash and the site to restart.

Looking in the production server's Event Viewer, I get the following error:

Application: w3wp.exe
CoreCLR Version: 6.0.1122.52304
.NET Version: 6.0.11
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ArgumentNullException: Value cannot be null. (Parameter 'source')
   at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
   at System.Linq.Enumerable.Count[TSource](IEnumerable`1 source)
   at EPiServer.Forms.Core.Internal.DataSubmissionService.IsMalFormSteps(IForm form)
   at EPiServer.Forms.Core.Internal.DataSubmissionService.GetSubmittableStatus(IForm form, HttpContext context)
   at AspNetCoreGeneratedDocument.FormsViews_Views_ElementBlocks_FormContainerInitScript.ExecuteAsync()
   at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context)
   at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, Boolean invokeViewStarts)
   at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context)
   at Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelper.RenderPartialCoreAsync(String partialViewName, Object model, ViewDataDictionary viewData, TextWriter writer)
   at Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelper.PartialAsync(String partialViewName, Object model, ViewDataDictionary viewData)
   at AspNetCoreGeneratedDocument.FormsViews_Views_ElementBlocks_Components_FormContainerBlock_FormContainerBlock.<>c__DisplayClass0_0.<<ExecuteAsync>g__RenderFormBody|0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
   at System.Threading.QueueUserWorkItemCallback.<>c.<.cctor>b__6_0(QueueUserWorkItemCallback quwi)
   at System.Threading.ExecutionContext.RunForThreadPoolUnsafe[TState](ExecutionContext executionContext, Action`1 callback, TState& state)
   at System.Threading.QueueUserWorkItemCallback.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()

I've done some research on the internal methods it references (GetSubmittableStatus, IsMalFormStep) and the only idea I can come up with is that there is some sort of corrupt form post upgrade causing these internals to crash rather than return true/false as intended.

Looking for any insight or ideas on what might be the cause or ideas of a solution.

Sep 19, 2023 4:14

Hi Sebp,

What version of forms are you on also?

Is the form setup as a multi-step form at all?


Sep 20, 2023 2:10
sebp - Sep 20, 2023 8:12

Sorry, forgot that one. The forms version is 5.4.0 and according to the client, as far as he knows, they're not using steps in any forms in any language.


I believe this is a bug. I will file a bug to Form team. Thanks for bringing this into our attention and apologies for any inconvenience it has caused 

Sep 20, 2023 8:34
Quan Mai - Sep 20, 2023 8:37
bug is AFORM-3581 (not yet public)
sebp - Sep 20, 2023 11:30
Thank you for the info, will keep the client posted.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.