1

I run an ASP.NET web application and have only just noticed that the behaviour of duplicate references in session state differs between InProc and ASP.NET SQL session state.

With InProc, duplicate references seem to stay reference equal over multiple requests without issue.

With SQL, behaviour seems to be:

  • if an object stored in session itself contains duplicate references, they stay reference equal
  • if two objects stored separately in session (Session["a"] and Session["b"]) contain a duplicate reference between them, on subsequent requests the objects are independent copies

I've found it hard to find any confirmation of this, so is it correct, and if not, where can I find documentation?

Rawling
  • 49,248
  • 7
  • 89
  • 127

0 Answers0