473,480 Members | 1,781 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Serialize session state & OutOfMemoryError?

I have an application running on a 3 server webfarm running Windows 2003 with
SQLServer Session state. After running for several hours, I started getting
the following error. When I access each app individually, only one of the
servers seems to return this error when I step through a sequence. I was
told that I'm trying to store an object not marked as Serializable but I've
tested this on a dev machine storing session variables without any problems,
plus it works for several hours before I have issues. I think something else
is the root of this error but I don't know where to look exactly.

Server Error in '/' Application.
--------------------------------------------------------------------------------

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:
[OutOfMemoryException: Exception of type System.OutOfMemoryException was
thrown.]

[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.SqlStateClientManager.Syst em.Web.SessionState.IStateClientManager.Set(String id, SessionStateItem item, Boolean inStorage) +126
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

Nov 19 '05 #1
2 2018
many objects are serialiable until an unserialiable property is set, or an
unserialiable object is added.
-- bruce (sqlwork.com)
"Dave" <Da**@discussions.microsoft.com> wrote in message
news:F6**********************************@microsof t.com...
I have an application running on a 3 server webfarm running Windows 2003
with
SQLServer Session state. After running for several hours, I started
getting
the following error. When I access each app individually, only one of the
servers seems to return this error when I step through a sequence. I was
told that I'm trying to store an object not marked as Serializable but
I've
tested this on a dev machine storing session variables without any
problems,
plus it works for several hours before I have issues. I think something
else
is the root of this error but I don't know where to look exactly.

Server Error in '/' Application.
--------------------------------------------------------------------------------

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:
[OutOfMemoryException: Exception of type System.OutOfMemoryException was
thrown.]

[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.SqlStateClientManager.Syst em.Web.SessionState.IStateClientManager.Set(String
id, SessionStateItem item, Boolean inStorage) +126
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

Nov 19 '05 #2
Bruce,

Sorry, can you expand on that? If I'm adding a dataset to my session and a
few hours into the day I start to get this error on one of the servers, I'm
not sure how that it explains the problem

Thanks.

"Bruce Barker" wrote:
many objects are serialiable until an unserialiable property is set, or an
unserialiable object is added.
-- bruce (sqlwork.com)
"Dave" <Da**@discussions.microsoft.com> wrote in message
news:F6**********************************@microsof t.com...
I have an application running on a 3 server webfarm running Windows 2003
with
SQLServer Session state. After running for several hours, I started
getting
the following error. When I access each app individually, only one of the
servers seems to return this error when I step through a sequence. I was
told that I'm trying to store an object not marked as Serializable but
I've
tested this on a dev machine storing session variables without any
problems,
plus it works for several hours before I have issues. I think something
else
is the root of this error but I don't know where to look exactly.

Server Error in '/' Application.
--------------------------------------------------------------------------------

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:
[OutOfMemoryException: Exception of type System.OutOfMemoryException was
thrown.]

[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.SqlStateClientManager.Syst em.Web.SessionState.IStateClientManager.Set(String
id, SessionStateItem item, Boolean inStorage) +126
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


Nov 19 '05 #3

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

Similar topics

0
3539
by: Not Liking Dot Net Today | last post by:
During high usage periods I am getting Stack trace below: System.Web.HttpException: Unable to make the session state request to the session state server. Please ensure that the ASP.NET State...
2
2163
by: John A Grandy | last post by:
for high traffic public websites , what are the proven options for session-state storage & management ? is an out-of-process state-server generally preferred over a sql-server ? what are the...
2
3909
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...
1
1468
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
39656
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...
0
1979
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...
0
2949
by: André | last post by:
Hello, I'm using 2005 c# .net and SQL server 2000. I want to store my session state in sql server. I am getting this error when I try to add a 'System.Web.UI.WebControls.Table' Unable to...
3
2315
by: tshad | last post by:
I am getting the 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...
3
3683
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
7046
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
7048
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
6956
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5342
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,...
1
4783
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
2997
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2986
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
183
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.