473,396 Members | 1,966 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Unable to serialize the session state.

Hi guys,

Because of restarting application after new DLLs installed into \Bin folder
, we move the session to StateServer, everything'a alright except when I try
to write any simple hash table into session. The Error message shows like
----------------------------------------------------------------------------
-----
Unable to serialize the session state. Please note that non-serializable
objects or MarshalByRef objects are not permitted when session state mode is
'StateServer' or 'SQLServer'.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Unable to serialize the session
state. Please note that non-serializable objects or MarshalByRef objects are
not permitted when session state mode is 'StateServer' or 'SQLServer'.

Source Error:
An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.
Stack Trace:
----------------------------------------------------------------------------
------

After reading some posts here and MSDN articles and makes me even more
confused because Hashtable object is ISerializable , and all things write
into hashtable are just strings, so should I do something else? or have to
manually serialize hashtable object by mysel ?

Thanks

Bill
Nov 18 '05 #1
1 3696
>
After reading some posts here and MSDN articles and makes me even more
confused because Hashtable object is ISerializable , and all things write
into hashtable are just strings, so should I do something else? or have to
manually serialize hashtable object by mysel ?

Thanks

Bill


Here is stack info,

[SerializationException: The type QMBI.General.Include.AccessedPage in
Assembly QMBI.General.Include, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null is not marked as serializable.]

System.Runtime.Serialization.FormatterServices.Int ernalGetSerializableMember
s(RuntimeType type, Boolean excludeNonSerializable) +853

System.Runtime.Serialization.FormatterServices.Get SerializableMembers(Type
type, StreamingContext context) +300

System.Runtime.Serialization.Formatters.Binary.Wri teObjectInfo.InitMemberInf
o() +103

System.Runtime.Serialization.Formatters.Binary.Wri teObjectInfo.InitSerialize
(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context,
SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter) +493

System.Runtime.Serialization.Formatters.Binary.Wri teObjectInfo.Serialize(Obj
ect obj, ISurrogateSelector surrogateSelector, StreamingContext context,
SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter) +48

System.Runtime.Serialization.Formatters.Binary.Obj ectWriter.Serialize(Object
graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck) +683

System.Runtime.Serialization.Formatters.Binary.Bin aryFormatter.Serialize(Str
eam serializationStream, Object graph, Header[] headers, Boolean fCheck)
+136
System.Web.Util.AltSerialization.WriteValueToStrea m(Object value,
BinaryWriter writer) +1621

[HttpException (0x80004005): Unable to serialize the session state. Please
note that non-serializable objects or MarshalByRef objects are not permitted
when session state mode is 'StateServer' or 'SQLServer'.]
System.Web.Util.AltSerialization.WriteValueToStrea m(Object value,
BinaryWriter writer) +1711
System.Web.SessionState.SessionDictionary.Serializ e(BinaryWriter writer)
+148
System.Web.SessionState.StateClientManager.Seriali ze(SessionStateItem
item, Stream stream) +146

System.Web.SessionState.OutOfProcStateClientManage r.System.Web.SessionState.
IStateClientManager.Set(String id, SessionStateItem item, Boolean inStorage)
+121
System.Web.SessionState.SessionStateModule.OnRelea seState(Object source,
EventArgs eventArgs) +465

System.Web.SyncEventExecutionStep.System.Web.HttpA pplication+IExecutionStep.
Execute() +60
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously) +87

seems .net do serialization for the hashtable object but the stream object
is MarshalByRefObject, then the error occurs... what can I do to fix that ?

Bill
Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Dave | last post by:
We just started getting this error message in our application today (stack trace below). From the OutOfMemoryException, I'm guessing it could be a memory leak. I'm making sure I'm closing all my...
0
by: Maciek | last post by:
Hi When I set Session state mode to StateServer (IIS 6.0; windows2003; .NET 2.0) in my application, I have recived this message:...
1
by: js | last post by:
Does anybody knows how to solve the problem? I added attribute to the following classes in Microsoft.Practices.EnterpriseLibrary.Data namespace, but I still get the error. Thanks. ...
1
by: Tim | last post by:
Could anyone tell me what this means and how do I correct it. Any suggestions? Thanks! Tim Richardson IT Developer and Consultant www.paladin3d.com Unable to serialize the session state. In...
6
by: tshad | last post by:
I had asked about this before, but have been unable to solve the problem. Could this be a problem with Web Services? I have 4 web services that I reference in this object. There is only one...
0
by: Nachi | last post by:
I have installed SQL Server 2000 with VS 2005 - did not install SqlExpress\Sql 2005. I have a remote Sql Server Instance locally. The normal application connectes to this Sql Server. When I run...
3
by: =?Utf-8?B?VG9ueSBTZXI=?= | last post by:
Come across an issue with IIS process HTTP request one by one, not simultaneously. I have a page that takes a long time to process. When the page is accessed by 2 seperate browser, both request...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.