Hi Everyone,
I was using Inprocess session objects, but incase of aspnet process
crashes the session objects were lost as a result I decided to shift to
out of porocess session objects. For this i had to serialize the
objects. While doing that I made the classes serializable whose objects
I store in sessions. However, when I run the application I get the
following error.
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:
[SerializationException: The type ASP.default_aspx in Assembly h5ahqjmx,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null is not marked as
serializable.]
System.Runtime.Serialization.FormatterServices.Int ernalGetSerializableMembers(RuntimeType
type, Boolean excludeNonSerializable) +853
System.Runtime.Serialization.FormatterServices.Get SerializableMembers(Type
type, StreamingContext context) +300
System.Runtime.Serialization.Formatters.Binary.Wri teObjectInfo.InitMemberInfo()
+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(Object
obj, ISurrogateSelector surrogateSelector, StreamingContext context,
SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter) +48
System.Runtime.Serialization.Formatters.Binary.Obj ectWriter.Write(WriteObjectInfo
objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo) +515
System.Runtime.Serialization.Formatters.Binary.Obj ectWriter.Serialize(Object
graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck) +738
System.Runtime.Serialization.Formatters.Binary.Bin aryFormatter.Serialize(Stream
serializationStream, Object graph, Header[] headers, Boolean fCheck) +136
System.Runtime.Serialization.Formatters.Binary.Bin aryFormatter.Serialize(Stream
serializationStream, Object graph) +13
System.Web.Util.AltSerialization.WriteValueToStrea m(Object value,
BinaryWriter writer)
[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)
System.Web.SessionState.SessionDictionary.Serializ e(BinaryWriter writer)
System.Web.SessionState.StateClientManager.Seriali ze(SessionStateItem
item, Stream stream)
System.Web.SessionState.OutOfProcStateClientManage r.System.Web.SessionState.IStateClientManager.Set( String
id, SessionStateItem item, Boolean inStorage)
System.Web.SessionState.SessionStateModule.OnRelea seState(Object
source, EventArgs eventArgs)
System.Web.SyncEventExecutionStep.System.Web.HttpA pplication+IExecutionStep.Execute()
+60
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously) +87
I'll appreciate if anybody could help me with this.
Thanks. 2 2565
The thing you need to do is figure out everything that you are storing in a
Session variable, and determine from this which of these objects is not
serializable or inherit from the MarshallByRef object.
--
Chris Jackson
Software Engineer
Microsoft MVP - Windows Client
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--
"Maximus" <me@maximus.net> wrote in message
news:Op**************@TK2MSFTNGP11.phx.gbl... Hi Everyone,
I was using Inprocess session objects, but incase of aspnet process crashes the session objects were lost as a result I decided to shift to out of porocess session objects. For this i had to serialize the objects. While doing that I made the classes serializable whose objects I store in sessions. However, when I run the application I get the following error. 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:
[SerializationException: The type ASP.default_aspx in Assembly h5ahqjmx, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null is not marked as serializable.]
System.Runtime.Serialization.FormatterServices.Int ernalGetSerializableMembers(RuntimeType type, Boolean excludeNonSerializable) +853
System.Runtime.Serialization.FormatterServices.Get SerializableMembers(Type type, StreamingContext context) +300
System.Runtime.Serialization.Formatters.Binary.Wri teObjectInfo.InitMemberInfo() +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(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter) +48
System.Runtime.Serialization.Formatters.Binary.Obj ectWriter.Write(WriteObjectInfo objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo) +515
System.Runtime.Serialization.Formatters.Binary.Obj ectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck) +738
System.Runtime.Serialization.Formatters.Binary.Bin aryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck) +136
System.Runtime.Serialization.Formatters.Binary.Bin aryFormatter.Serialize(Stream serializationStream, Object graph) +13 System.Web.Util.AltSerialization.WriteValueToStrea m(Object value, BinaryWriter writer)
[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) System.Web.SessionState.SessionDictionary.Serializ e(BinaryWriter writer)
System.Web.SessionState.StateClientManager.Seriali ze(SessionStateItem item, Stream stream)
System.Web.SessionState.OutOfProcStateClientManage r.System.Web.SessionState.IStateClientManager.Set( String id, SessionStateItem item, Boolean inStorage) System.Web.SessionState.SessionStateModule.OnRelea seState(Object source, EventArgs eventArgs)
System.Web.SyncEventExecutionStep.System.Web.HttpA pplication+IExecutionStep.Execute() +60 System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean& completedSynchronously) +87
I'll appreciate if anybody could help me with this.
Thanks.
Chris Jackson wrote: The thing you need to do is figure out everything that you are storing in a Session variable, and determine from this which of these objects is not serializable or inherit from the MarshallByRef object.
Thanks for the reply, I tried that and have marked all the objects which
I could. In most cases it would tell me which object it could not
serialize. But here it is saying it cannot serialize 'ASP.default_aspx
in Assembly 9iq31h5o'.
What I dont understand is why is it trying to serialize the default.aspx
page and also where is this assmebly Assembly 9iq31h5o created.
Any help will be appreciated. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: ktn |
last post by:
Hi all,
I'm a .NET beginner and I've got a problem on a program where I try to do an
XML serialization.
I get the following error :
"An unmanaged exception of type...
|
by: andrewcw |
last post by:
There is an error in XML document (1, 2).
I used XML spy to create the XML and XSD. When I asked to
have the XML validated it said it was OK.
I used the .net SDK to generate the class. I have...
|
by: Alexander |
last post by:
When i store rule on PC with .NET.SP1 i cant restore them from PC without
SP1.
An i get this Error:
System.Runtime.Serialization.SerializationException:
Possible Version mismatch. Type...
|
by: Sek |
last post by:
Hi Folks,
While deserialization in C#, i came across this error:
"No assembly ID for object type <MyClassName>".
The error is very abstract. Pls find below the stack trace.
StackTrace
at
|
by: CJ Taylor |
last post by:
hey everyone, thought I would ask this here because the web service groups
seems pretty light on conversation. I'm buliding a web service, but keep
getting this error. I understand the error,...
|
by: Paulo Morgado [MVP] |
last post by:
Hi all
..NET Framework 1.1
I have created several types that are serailized to XML as strings. Someting
like this:
public struct MyInt32 : IXmlSerializable
{
int value;
|
by: Norman Chong |
last post by:
Hiddeldi ho,
I want to save an object so that I can use its content after I restart
my program. I tried to solve this with serialization because someone
told me that this is the correct way for...
|
by: =?Utf-8?B?UGlnZ3k=?= |
last post by:
Hi to all,
I am getting this System.OutOfMemoryException calling the
Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(<stream>,<Obj>) method.
The type of <streamis...
|
by: =?Utf-8?B?Y211cmFsaQ==?= |
last post by:
I am serializing/deserializing a class (Class1) using the XmlSerializer
object in the System.Xml.Serialization namespace in .Net 2.0. Class1 has
some strings and ints and two lists of other simple...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |