ASP.NET Sesssion State, SQL Server, Objects, Invalid Cast

G

Guest

Hi,

We are currently running an asp.net application where we are using sql
server to store session state. There are a couple of areas where we store
the state in a class that we then add to the session object. The classes in
question use the [Serializable] attribute. This seemed to work well, we can
put a bit of state into the session object, then cast it back into a class
and use it when needed.

Last week we had a user who was getting an "System.InvalidCastException:
Specified cast is not valid." error. This has only happened with one user so
far, and was intermittent.

Has anyone had similar problems? What sort of things on the client would
affect the way IIS is able to store state?

Environment
Operating System: Windows 2003
Web Server:IIS 6.0
Application:.NET Framework 1.1
Language: C#
Web Browser: Internet Explorer 6.0

Thanks,

Mike
 
A

Alvin Bruney [MVP - ASP.NET]

since session information isn't guaranteed to be there, are you testing for
null when you pull out of session?

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top