Indexing HttpContext property can cause OutOfMemory exception

  • Updated

While there are many different causes for the exception OutOfMemory, this KB concerns the very rare case of indexing an HttpContext property.  Indexing an HTTP context property can cause the app service to run out of memory, a catastrophic outcome. 


Apply the attribute "[Newtonsoft.Json.JsonIgnore]" to the HttpContext property to ensure it is not indexed.