System.ArgumentException: Destination array was not long enough

Been getting alot of this error for quite some time now. Anyone have a clue what might be causing this?

The site is load balanced between two servers with a Netscaler in front. SessionState is stored in SQLServer

See also: http://world.episerver.com/forum/developer-forum/Problems-and-bugs/Thread-Container/2017/6/system.argumentexception-item-has-already-been-added.-key-in-dictionary-39.epiform_visitoridentifier39/

It seems the error first occured with the following packages:

  

Current packages:

Stacktrace:

2017-06-07 07:10:18,209 [12] ERROR [] EPiServer.Logging.Compatibility.LogManager+CompatibilityWrapper.Error: 1.2.5 Unhandled exception in ASP.NET
System.Web.HttpException (0x80004005): Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper'. ---> System.ArgumentException: Destination array was not long enough. Check destIndex and length, and the array's lower bounds.
   at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
   at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length)
   at System.Array.CopyTo(Array array, Int32 index)
   at System.Web.HttpRequest.FillInCookiesCollection(HttpCookieCollection cookieCollection, Boolean includeResponse)
   at System.Web.HttpRequest.ResetCookies()
   at System.Web.HttpResponse.SetCookie(HttpCookie cookie)
   at EPiServer.Forms.Core.Internal.VisitorIdentify.DefaultVisitorIdentifyProvider.SetVisitorIdentifier(String visitorIdentifier)
   at EPiServer.Forms.Controllers.FormContainerBlockController.SetVisitorIdentifierIfNeeded(HttpContextBase httpContext)
   at EPiServer.Forms.Controllers.FormContainerBlockController.Index(FormContainerBlock currentBlock)
   at lambda_method(Closure , ControllerBase , Object[] )
   at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.

[Pasting files is not allowed]

#179264
Jun 07, 2017 8:23

Judging from the stacktrace i suspect you use too many cookies.

I think .Net limits you to 20 cookies per domain. (as well as about 4000 bytes in total size for all those cookies.)

#179296
Jun 07, 2017 15:42
* 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.