473,699 Members | 2,693 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Serialize session state & OutOfMemoryErro r?

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.Http Exception: 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:
[OutOfMemoryExce ption: Exception of type System.OutOfMem oryException 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 .AltSerializati on.WriteValueTo Stream(Object value,
BinaryWriter writer) +1711
System.Web.Sess ionState.Sessio nDictionary.Ser ialize(BinaryWr iter writer)
+148
System.Web.Sess ionState.StateC lientManager.Se rialize(Session StateItem
item, Stream stream) +146

System.Web.Sess ionState.SqlSta teClientManager .System.Web.Ses sionState.IStat eClientManager. Set(String id, SessionStateIte m item, Boolean inStorage) +126
System.Web.Sess ionState.Sessio nStateModule.On ReleaseState(Ob ject source,
EventArgs eventArgs) +465

System.Web.Sync EventExecutionS tep.System.Web. HttpApplication +IExecutionStep .Execute() +60
System.Web.Http Application.Exe cuteStep(IExecu tionStep step, Boolean&
completedSynchr onously) +87

Nov 19 '05 #1
2 2035
many objects are serialiable until an unserialiable property is set, or an
unserialiable object is added.
-- bruce (sqlwork.com)
"Dave" <Da**@discussio ns.microsoft.co m> wrote in message
news:F6******** *************** ***********@mic rosoft.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.Http Exception: 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:
[OutOfMemoryExce ption: Exception of type System.OutOfMem oryException 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 .AltSerializati on.WriteValueTo Stream(Object value,
BinaryWriter writer) +1711
System.Web.Sess ionState.Sessio nDictionary.Ser ialize(BinaryWr iter writer)
+148
System.Web.Sess ionState.StateC lientManager.Se rialize(Session StateItem
item, Stream stream) +146

System.Web.Sess ionState.SqlSta teClientManager .System.Web.Ses sionState.IStat eClientManager. Set(String
id, SessionStateIte m item, Boolean inStorage) +126
System.Web.Sess ionState.Sessio nStateModule.On ReleaseState(Ob ject source,
EventArgs eventArgs) +465

System.Web.Sync EventExecutionS tep.System.Web. HttpApplication +IExecutionStep .Execute()
+60
System.Web.Http Application.Exe cuteStep(IExecu tionStep step, Boolean&
completedSynchr onously) +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**@discussio ns.microsoft.co m> wrote in message
news:F6******** *************** ***********@mic rosoft.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.Http Exception: 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:
[OutOfMemoryExce ption: Exception of type System.OutOfMem oryException 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 .AltSerializati on.WriteValueTo Stream(Object value,
BinaryWriter writer) +1711
System.Web.Sess ionState.Sessio nDictionary.Ser ialize(BinaryWr iter writer)
+148
System.Web.Sess ionState.StateC lientManager.Se rialize(Session StateItem
item, Stream stream) +146

System.Web.Sess ionState.SqlSta teClientManager .System.Web.Ses sionState.IStat eClientManager. Set(String
id, SessionStateIte m item, Boolean inStorage) +126
System.Web.Sess ionState.Sessio nStateModule.On ReleaseState(Ob ject source,
EventArgs eventArgs) +465

System.Web.Sync EventExecutionS tep.System.Web. HttpApplication +IExecutionStep .Execute()
+60
System.Web.Http Application.Exe cuteStep(IExecu tionStep step, Boolean&
completedSynchr onously) +87


Nov 19 '05 #3

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

Similar topics

0
3575
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 service is started and that the client and server ports are the same. If the server is on a remote machine, please ensure that it accepts remote requests by checking the value of...
2
2179
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 relevant criteria ? is the primary criteria max expected total storage size (for all active sessions) versus max ram available on the state-server machine ? if ADO.NET objects (such as small DataTables) must be stored in session-state , is any...
2
3941
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 connections in the finally block but I'm not sure what I should be doing. As far as the "Unable to serialize the session state" error, this app has been running for days and this is the first I've seen this one as well. Any thoughts would be...
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. Database.cs DatabaseFactory.cs DatabaseProviderFactory.cs DBCommandWrapper.cs
1
39700
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 'StateServer' and 'SQLServer' mode, ASP.NET will serialize the session state objects, and as a result non-serializable objects or MarshalByRef objects are not permitted. The same
0
2008
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 Asp.Net Configuration from VS 2005 it gives this error. I have removed 'LocalSqlServer' in machine.Config and added in web.config as following.
0
2960
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 serialize the session state. In 'StateServer' and 'SQLServer' mode, ASP.NET will serialize the session state objects, and as a result non-serializable objects or MarshalByRef objects are not permitted. The same restriction applies if similar...
3
2328
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 'SQLServer'. I have a .DLL that has 4 classes: <Serializable()Public Class POP3Client <Serializable()Public Class EMail
3
3707
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 will be processed the same time. But if the 2nd browser is opened by IE->File->New Window, when the 2 browsers try to access the same page, the requests are handle sequentially. Same behaviour with 2 firefox browser.
0
9173
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8911
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8882
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7748
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6533
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5872
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4375
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3057
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 we have to send another system
3
2009
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.