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

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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

.



Relevant Pages

  • Re: Storing a datatable (or arraylist )on ASP.NET Session
    ... Perhaps your ArrayList store smth which can't be casted to object. ... If exactly that code u shown didn't work (emply arraylists) that I recomment to re-register asp.net 2.0 calling aspnet_regiis,exe - i ... Team blog: http://devkids.blogspot.com/ ... b> session variables is stored on web server's local sql database. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: LISP for web
    ... >>Ideas on how to store this information centrally for all of the app ... > ucw's form handling code (to make sure session ids are always ... > can deal with hardware failures an the app servers but this ...
    (comp.lang.lisp)
  • Re: Problem with asp.net app only allowing 1 user at a time
    ... from the client to the server), Application (an object that can store ... Now in your case you are reading and writing everything to the database, ... there is the Session object. ... To retrieve this you would do something like: ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: LISP for web
    ... > Ideas on how to store this information centrally for all of the app ... the risk of losing data and sessions if one of the machines goes ... ucw's form handling code (to make sure session ids are always ...
    (comp.lang.lisp)
  • Re: Caching often-used SQL queries
    ... The problem is that neither one of those are user (session) specific. ... need to enable sessions and store the data in the session context. ... Second - you'd be caching so much data that it would ... And if you tune your database server you'll spend much more time processing ...
    (microsoft.public.dotnet.framework.performance)