This project is read-only.

Custom types in session cause an infinite lock

Oct 11, 2015 at 1:12 PM
I think this might be a bigger issue than the title suggests.

Essentially, if you have an object in session that is not of a type that is available in GAC your code throws an exception. This in itself is not a problem, the issue is that this exception causes the code to never release the session.

I think there needs to be some exception handling in that as it's going to be a core piece of code to our platform.

As it stands, we will only be using it for classic asp, so shouldn't be too much of an issue.

Is this something you think is a problem?
Oct 13, 2015 at 3:57 AM
Martin, it is possible for me to handle the exception and release the session, but I will not be able to get the session if any exception occurs. My code calls the existing code in asp.net session provider. If an serialization exception occurs, the entire get will fail. Therefore, depending how you deploy NSession, it is best for you to put your types in GAC or in bin so that the deserialization code in the provider can locate your type.