-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: ISessionImpl-ArgumentNullException in ASP.NET WebGarden mode
PostPosted: Thu Jul 31, 2008 10:57 am 
Newbie

Joined: Thu Jul 31, 2008 9:56 am
Posts: 1
Hibernate version:1.2.1.4000
IIS version 7, .NET Framework 2.0

I want store ISession in HttpSession without closing it until one business process completes. But when I increase the worker process count, ASP.NET tries to serialize ISession object to state server and following exception occurs.

Note: I have enabled sessionState service and the web.config file contains <sessionState mode="StateServer"></sessionState>

The exception has been thrown in this line of code:
ISession _result = Session["HibernateSession"] as ISession;

Stack Trace:
[ArgumentNullException: Key cannot be null.
Parameter name: key]
System.Collections.Hashtable.get_Item(Object key) +2909973
NHibernate.Impl.SessionFactoryObjectFactory.GetNamedInstance(String name) +46
NHibernate.Impl.SessionFactoryImpl.GetRealObject(StreamingContext context) +56
System.Runtime.Serialization.ObjectManager.ResolveObjectReference(ObjectHolder holder) +61
System.Runtime.Serialization.ObjectManager.DoFixups() +2798521
System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) +203
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) +190
System.Web.Util.AltSerialization.ReadValueFromStream(BinaryReader reader) +790
System.Web.SessionState.SessionStateItemCollection.ReadValueFromStreamWithAssert() +54
System.Web.SessionState.SessionStateItemCollection.DeserializeItem(String name, Boolean check) +257
System.Web.SessionState.SessionStateItemCollection.get_Item(String name) +22
System.Web.SessionState.HttpSessionStateContainer.get_Item(String name) +10
System.Web.SessionState.HttpSessionState.get_Item(String name) +10
MultiWp._Default.get_HibSession() in D:\Development\Projects\Training\MultiWp\Default.aspx.cs:28
MultiWp._Default.Page_Load(Object sender, EventArgs e) in D:\Development\Projects\Training\MultiWp\Default.aspx.cs:22
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +33
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.