I have a class which I want to put session:
[Serializable]
public class Model
{
private readonly List<Uri> uris;
public Model()
{
uris = new List<Uri>();
}
public IEnumerable<Uri> Uris { get { return uris; } }
}
An instance of this class and some strings are added to Session. Sql SessionState is used.
My problem is that sometimes when I get the Model object from session, the uris field is null. Please be noticed that all other primitive type session items are still correct. I'm using ASP.NET 4.0 btw.
Could anyone please explain to me how this can happen?
Thank you in advance :-)