Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>nrod, for completeness it would be good to post your code.</p> <p>However from your stack trace I can already see the error is occuring in the (MVC) framework (e.g. System.Web). Íf the stack trace points to your own code the problem is normally due to manipulating a collection (.e.g removing, adding) while iterating over it (for instance in a foreach loop). Some suggestions are to to iterate in reversed way or to use a .ToList() on your collection, see: <a href="https://stackoverflow.com/questions/604831/collection-was-modified-enumeration-operation-may-not-execute">Collection was modified; enumeration operation may not execute</a> <a href="https://stackoverflow.com/questions/4536090/collection-was-modified-enumeration-operation-may-not-execute-why">Collection was modified; enumeration operation may not execute - why?</a></p> <p>However your stack trace indicates the problem is from calls from your code to the (MVC) framework. This kind of problem can be caused by using instance member variables in a shared custom implemented IRouteHandler.GetHttpHandler(). That is because instance member are NOT thread safe, as documented on MSDN: <a href="http://msdn.microsoft.com/en-us/library/system.web.http.webhost.httpcontrollerroutehandler%28v=vs.108%29.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/system.web.http.webhost.httpcontrollerroutehandler%28v=vs.108%29.aspx</a> </p> <p>Your stack trace indicates you are indeed using member vars. The error could then occur when doing lots of concurrent calls (e.g. in a production environment).</p> <p>You can fix the problem by refactoring the code not to use any instance members. This might lead to somewhat monolithic and repetitive code. For instance when refactoring to using only local variables. But you can also try and refactor use to public static members or static functions instead, since these ARE thread safe.</p> <p>After fixing this problem myself I decided it would be good to always do some load testing of new code, as otherwise these kinds of problems will only be detected on production!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload