Unable To Serialize Session State - Server Errors

Oct 14, 2010

We have been receiving reports of the following server error periodically from users.
[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".

Once in a state where this error appears, it appears to be hit or miss whether the errors are reproducible locally. If they are, then we can usually reproduce them for a couple minutes, but not on every page hit. This usually tapers off on its own and usually has resolved itself by the time we get back in contact with the users. The Web Service has around 90-100 active connections during business hours. The only other site on this server is the staging version of this site, which gets hit very infrequently. The Session State is stored on the same SQLServer instance as the application database which is housed on a fairly large cluster of virtual machines.

Neither the Web Server or the SQLServer seemed to be taxed (either processor or memory-wise) while this is going on. The distribution of which pages are erroring seems to be comparable to the normal distribution for each page. There doesn't appear to be any pattern in terms of times of occurrence. We do have less errors on average on weekends (which correlates to normal site load), but even this appears to not be consistent. There also doesn't appear to be a correlation between the errors logged and any kind of logged performance monitor events. This includes an array of perfmon counters including:

.NET CLR Jit(w3wp)
otal # of IL Bytes Jitted
.NET CLR Jit(w3wp)IL Bytes Jitted / sec
.NET CLR Jit(w3wp)\% Time in Jit
.NET CLR Jit(w3wp)# of Methods Jitted
.NET CLR Jit(w3wp)# of IL Bytes Jitted
ASP.NET Apps v1.1.4322(__Total__)Requests Failed
ASP.NET Apps v1.1.4322(__Total__)Errors Unhandled During Execution/Sec
ASP.NET Apps v1.1.4322(__Total__)Errors Unhandled During Execution
ASP.NET Apps v1.1.4322(__Total__)Cache Total Turnover Rate
ASP.NET Apps v1.1.4322(__Total__)Errors During Preprocessing
ASP.NET Apps v1.1.4322(__Total__)Errors During Execution
ASP.NET Apps v1.1.4322(__Total__)Requests Executing
ASP.NET Apps v1.1.4322(__Total__)Requests Total
ASP.NET Apps v1.1.4322(__Total__)Errors Total
ASP.NET Apps v1.1.4322(__Total__)Sessions Abandoned
ASP.NET Apps v1.1.4322(__Total__)Errors Total/Sec
ASP.NET Apps v1.1.4322(__Total__)Anonymous Requests/Sec
ASP.NET Apps v1.1.4322(__Total__)Requests/Sec
ASP.NET Apps v1.1.4322(__Total__)Session SQL Server connections total
ASP.NET Apps v1.1.4322(__Total__)Cache Total Hit Ratio
ASP.NET v1.1.4322Requests Current
ASP.NET v1.1.4322Request Execution Time
MemoryPages/sec
Bytes Total/sec
PhysicalDisk(_Total)Avg. Disk Queue Length
Processor(_Total)\% Processor Time
Web Service CacheFile Cache Hits %
Web Service CacheFile Cache Misses
Web Service CacheFile Cache Hits
Web Service(_Total)Current Connections
Web Service(_Total)Post Requests/sec)

The only pattern I can see in the logs doesn't correlate to the occurrence of these errors, but is the only pattern I can see. Looking at the perfmon logs we are seeing a pattern where the "Total # of IL Bytes Jitted", "IL Bytes Jitted / sec", "% Time in Jit", "# of Methods Jitted", and "# of IL Bytes Jitted" counters for the staging site (which shouldn't be getting any traffic) doesn't pull data for a 20-50 minute period after which there is an immediate spike in "IL Bytes Jitted / sec" and a jump in "% Time in Jit" for 2-20 minute of up to 99% for the main site.

View 1 Replies


Similar Messages:

State Management :: Unable To Serialize The Session State In 'StateServer' And 'SQLServer' Mode

Dec 12, 2010

I am new to .net 4.0 and am using EF Model and SessionState Mode=SqlServer and I am getting this error below:

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 serialization is done by the custom session state store in 'Custom' mode.

I checked the stack trace and its complaining about

[assembly: global::System.Data.Objects.DataClasses.EdmSchemaAttribute()]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("PoplarGroveModel", "tblMenuRole", "tblMenu", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(PoplarGroveDataModel.Menu), "tblRole",

[Code].....

I marked it as serializable but then it complains about System.Data.Objects.ObjectContext is not marked as serializable and hence throws the same error.

View 1 Replies

Unable To Serialize Session State

Dec 11, 2013

Getting error when trying to save structured arraylist into session Variable (see btnTS_Click below)

Code works on my desktop VS2012 devel system but not when posted to webserver we use.

Try It: [URL] ....

Code:
Public Class _Default
Inherits System.Web.UI.Page
Structure HoursData
Dim Project As String

[Code]...

View 9 Replies

Web Forms :: 3.5 Error: Unable To Make The Session State Request To The Session State Server?

Dec 7, 2010

Have not run the ASP.NET Development Server for a while. Today I copied a production website to my workstation and ran it with VS 2008. The following error message popped up. What is the problem with the ASP.NET development Server on my workstation? The website on the Production server still ran okay.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 KEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesaspnet_stateParametersAllowRemoteConnection.
If the server is on the local machine, and if the before mentioned registry value does not exist or is set to 0, then the state server connection string must use either 'localhost' or '127.0.0.1' as the server name.

View 2 Replies

Serialize Linq To SQL Entities For Use In Out - Of - Proc Session State?

Mar 11, 2010

I need to put some of the entities created via a.dbml Linq-To-Sql file into Session State. Because I am using out-of-proc State Server, they need to be serializable. How can I achieve this? I have tried setting the Serialization mode in the .dbml file to 'Unidirectional'.

View 1 Replies

State Management :: Serialize/Deserialize A Custom Class In And Out Of A Session

Mar 18, 2011

I'm trying to save a custom class in a session, but it just never gets saved, along with other sessions. Note that my SessionMode = STATESERVER, and i cannot change it to INPROC as per our business requirement. This is my class

/*******START*******/
[Serializable]
public class User : ISerializable
{
private int _userId;
public int UserId
{
get { return _userId; }
set { _userId = value; }
}
//custom class
private TDB.tdbUser _tdbUserDetails;
public TDB.tdbUser tdbUserDetails
{
get { return _tdbUserDetails; }
set { _tdbUserDetails = value; }
}
//collection of custom class Sites
private List<Sites> _assignedSites;
public List<Sites> AssignedSites
{
get { return _assignedSites; }
set { _assignedSites = value; }
}
public User()
{
//Constructor code
}
/******SERIALIZATION*****/
protected User(SerializationInfo info, StreamingContext context)
{
this._userId = (int)info.GetValue("_userId", typeof(int));
this._assignedSites = (List<Sites>)info.GetValue("_assignedSites", typeof(List<Sites>));
this._tdbUserDetails = (TDB.tdbUser)info.GetValue("_tdbUserDetails", typeof(TDB.tdbUser));
}
[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.SerializationFormatter)]
void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
{
info.AddValue("_userId", this._userId);
info.AddValue("_assignedSites", this._assignedSites);
info.AddValue("_tdbUserDetails", this._tdbUserDetails);
}
}
/*******END*******/

The calling code is just this: (User)HttpContext.Current.Session["TDBUSER"];

View 2 Replies

State Management :: Unable To Make The Session State Request

Apr 21, 2010

Our Web Server rebooted due to power failure. Now ASP.Net State service would not start logging the following error on the server:

Unable to make the Session State Request to the session state server. Last known phase=Sending request to the state server

how to bring back the ASP.Net State service.

View 2 Replies

State Management :: Set The Mode Of Session State As State Server And Point To Another Server?

Aug 26, 2010

In my web application, I set the mode of session state as State Server and point to another server. After run some days, I always meet following exception:

The state server has closed an expired TCP/IP connection. The IP address of the client is 192.168.80.157. The expired Read operation began at 08/25/2010 14:18:03.

View 2 Replies

C# - Session State Giving Errors "does Not Exist In Context"?

Mar 20, 2011

im trying to set some session state variables but im getting back the error:Error 3 The name 'txtFirstName' does not exist in the current contextHere is what I added into the event handler of a submit button

Session["txtFirstName"] =
txtFirstName.Text;
Session["txtLastName"] = txtLastName.Text;
Session["txtPayRate"] = txtPayRate.Text;
Session["txtStartDate"] = txtStartDate.Text;
Session["txtEndDate"] = txtEndDate.Text;

while i was typing this code, the text field names such as txtLastName were popping up in intellisense, so that would lead me to believe that they ARE in context, but im still getting this error. I've also tried:

HttpContext.Current.Session["txtFirstName"] = txtLastName.Text;

But that was giving the same error. Im stumped. Am i forgetting something? Do I need to add something else in.

View 1 Replies

Unable To Access Session State From Class?

Jul 2, 2010

I have a Dynamic Data application to which I have added a class for extending EDM. Everything works great, but now I am trying to set an entity property value equal to a value in session state - and its not recognizing the Session command. I'm trying to do something like this:

audit.action_by = CStr(Session("person_name"))

I think this is because I do not have the class Inheriting Page, but if I do add Inherits Page it breaks other stuff. How can I have the class include the ability to utilize sessions directly without inheriting Page?

View 2 Replies

Visual Studio :: Errors While Trying To Run Web Application - Unable To Connect To Development Server

Sep 29, 2010

I got these errors while trying to run a web application using vs 2008, The first error is this: >Application has generated an exception that could not be handled. >process ID=0x1130 (4400), Thread ID=0xe6c (3692). And when I press OK a second dialog reports this error:>unable to connect to the asp.net development server. I reinstalled, repaired and re registered msdbg2.dll and edited hosts file but still get this error. I need to debug an application but I can't. This error is on a 'Win 2003 server enrterprise service pack 1' with a vs2008 team system installation. What can I do to remove this error and run and debug my application?

View 1 Replies

C# - Unable To Share Session State Between 2 Web Apps With StateServer?

Jul 20, 2010

I'm having trouble getting 2 identical ASP.NET MVC applications to share the same Session using a Session StateServer. The reason I'm trying to do this is we will eventually be deploying this app across 3 web servers that need to share the same state. We need to use StateServer because we are trying to minimise use of the db for non data-related storage.

The Setup: I've deployed the same code base to http://localhost/App1 and http://localhost/App2

both have identical Web.Config files with the following:

<system.web>
<sessionState mode="StateServer"
cookieless="false" [code]....

The Result:For both deployments, when the page first loads I can see that the mode is StateServer and the timestamp is getting set to the same time as the realtime value.. However, if this was working, only the first page should have the same time as the realtime value. The second page load should read from the StateServer because that timestamp value is no longer null, and display that time value. But instead, it's displaying the realtime value again.

When I refresh the page, I the timestamp stays the same and the realtime value is always updating. This indicates that the timestamp is being saved to the Session, but the time stamp value is always different for both deployments when it should be the same, so this indicates that the Session is not being shared.

View 4 Replies

State Management :: Unable To Retain Session Variable?

Jun 17, 2010

We are setting session variables in the login page with all user details.And in all subsequent pages we check this session variable.This check is done in the page load of master page.As the number of users increased am getting error with these session variables.This session variable is returning me "nothing" when I check and the user is redirected to logout page.Interesting thing is that this is not happening always.

View 2 Replies

State Management :: Session Mode State Server - Sending Asynchronous Request

Nov 5, 2010

Customer were getting "View State Validation Error" due to worker process recycling at our production webserver and to fix that i applied machinekey and then move my Session state Mode from In Proc to State Server to retain session data and not kick out the customer to relogin. I had serialization issue with one object which has to be stored in session but when i moved it out of session i could able to resolve the issue.

But doing all these i was partly successfull in keeping the user in their session when Worker Process recycle event occurs.I was able to refresh the page or make a post back by clicking the refresh button and also able to retain the session values. But the Problem occurs when sending asynchronous request to server which we do periodically every 15 minutes from the moment the user logs in.The web page doesnot update data on website when sending asynchronous request.By Debugging I found at this particular code point it fails to make a postback which is required.

<%=GetHintFromServer%> (When there is no Worker Process recycle i t gets replaced by
WebForm_DoCallback('__Page',message,ShowHint,null,null,false) on postback) Everything works fine when there is no Worker Process Recyling but when it happens looks like sending request asynchronously using javascript fails .Remember When I make a post back by manually clicking submit button everything works fine.

SendRequest(Asynchronous)
function SendRequest(msg, isBusy, chartMsg, vesselMsg)
{
try
{
//confirm("msg"+msg+"isBusy"+isBusy+"chartMsg"+chartMsg+"VesselMsg"+vesselMsg);
_busy = isBusy;
if(chartMsg != null)
{
//confirm("chartMsg"+chartMsg);
_element.SetMessage(true, chartMsg);
}
if(vesselMsg != null)
{
confirm("chartMsg"+vesselMsg);
_element.ShowVesselLoading(true, vesselMsg);
}
_stuckWatchdog = setTimeout( "ClearPendingRequest();", 60000);
var message = msg;
var context = '';
<%=GetHintFromServer%>
}
catch(e)
{
alert( "Exception error on SendRequest(): " + e);
}
}

View 2 Replies

State Management :: Recreate State Session Database In SQL Server 2008?

Apr 5, 2010

Our ASP.NET App uses ASP State Session Management and has been rebuilt about 2 years ago [With .NET Framework 2.0]. We are currently in .NET framework 3.5 and have moved to SQL Server 2008 - but continue to use the same ASPState database. The State database has been upgraded to SQL Server 2008. Since then we have are seeing timouts/locks on ASPStateTempSessions table. I am wondering if we have to rebuild this database from scratch with some newer scripts?

View 2 Replies

State Management :: Version 2.0 Session State Not Installed On SQL Server?

Oct 27, 2010

The fix for this error message is to run [Code]..... I have run that uptown, downtown and in my lady's chamber and it does no good, although it never complains. Are there any other possibilities?Details:
IIS Server: v5.1 running on XP. SQLServer 2005 running on a different XP box.Microsoft .NET Framework Version:2.0.50727.3615; ASP.NET Version:2.0.50727.3618 There is an ASPState database on the server, containing only two tables: [Code].... and [Code]..... I did not use [Code].... when I ran [Code]....
.

View 2 Replies

State Management :: Session And Session Variables Not Stable In Development Server?

Oct 11, 2010

I use some session variables to get the job done(shopping cart, etc) but it is not stable..manytimes I get no items in session object and other times(refreshing the page) I get missing data...I downloaded the entire site code to my local pc and debugged it and run it succesfully without any session data missing...When I run it in the server, I get bad session again: no products in shopping cart or products with missing quantities...

The same website runs smoothly in our production server too....The problem is with our development server...

View 2 Replies

Security :: Session State SQL Server State Mode?

May 4, 2010

In my database I have already installed the aspnetdb membership tables and process (think that was running : aspnet_regsql.exe) with all my other custom build tables for my project. All works fine.I want to use SQL server session state. (Asp.net 2.0, SQL server 2005)My project will be on a SHARED HOSTING environment, and I only want ONE database that holds all I need ( membership, custom tables, session state table, etc)I see two files in : C:WINDOWSMicrosoft.NETFrameworkv2.0.50727

InstallSqlState.sql
InstallSqlStateTemplate.sql

I assume I run the "InstallSqlStateTemplate.sql" and follow instruction from this reference to SQL server session state operational in my single project database : [URL]

View 2 Replies

State Management :: Serialize TreeNode With Sql?

Jan 21, 2011

Currently I am working on SessionState with SQL. I have problem. I would like to serialize TreeNode. This TreeNode pbject will be assigned to Session and this is declare as below.

private _treeNode as TreeNode <-- member variable

how do I make this _treeNode seriablizable?

View 1 Replies

State Management :: How To Serialize Objects

Jul 2, 2010

Is there any way or process to serialize the the objects?? i am trying to store the instance of few control in viewstate but it shows error msg that it is not a serialized object. should i perform some steps to serialize the objects ???

View 9 Replies

State Management :: How To Serialize An Object Into Cookie

Apr 1, 2010

I had an xml-serialization which worked fine, but as I have just knew it doesn't work in Opera browser. I think, it's security rules don't allow to write to cookies xml-content.What can I do? Can I use binary serialization or something else?

View 2 Replies

State Management :: Session Variable Worked On One Prod Server But Not On Another Server?

Nov 3, 2010

We recently migrated a web app from one Prod server (Prod 1) to another server (Prod 2). There is a session varialbe checked inside the page load event of the default master page. I have enabled session state both in web.config as well inside the pagedirective. The compilation went through without any issue. The web app is also running just fine on the server but the log file keeps logging a warning message. There is no run time error.

"System.Web.HttpException: Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration><system.web><httpModules> section in the application configuration."Any idea why this is happening on one server vs other?

View 3 Replies

State Management :: Error :Session State Has Created A Session Id, But Cannot Save It?

Nov 18, 2010

I read the solutioin for this error, at the following link :http://forums.asp.net/p/1046935/1576341.aspxbut I am still not clear what exactly causes the error. I have two doubts :1. Can anyone please elaborate a bit on this issue, with any example ????2. Is there any drawback of this approach ?

View 4 Replies

What's Difference Between Normal Session State And Cookieless Session State

Feb 16, 2010

In ASP.NET, I'm a bit confused about role of cookies in session state. Whats is the difference between normal session state and cookieless session state?

View 5 Replies

Can Use SQL Server Session State With Sessions That Contain DataTables

Feb 2, 2011

I have inherited an ASP.NET 3.5 application that relies heavily on sessions and storing DataTables within them (I know - bad, bad, bad). The application pool on the remote shared hosting service indicated that memory is at full capacity and as a result customers are losing their shopping carts because of dropped sessions.

Ultimately the goal is to rewrite this code, but for the time being I would like to stabilize the site the best I can. The host has recommended I use SQL Server Session State instead of in-proc. I have no experience with this, so I'm hoping it's as simple as running the .sql against the database to configure SQL Server and updating the web.config.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved