![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
In web.config, sessionState mode="InProc" works, because asp doesn't actually serialize the session when set to InProc however, if you switch your session state to either sessionState mode="StateServer" or sessionState mode="Custom" ASP throws: 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. [SerializationException: Type 'Microsoft.AnalysisServices.AdomdClient.AdomdConne ction' in Assembly 'Microsoft.AnalysisServices.AdomdClient, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' is not marked as serializable.] in CellSetGrid.cs: private adomdp.AdomdConnection _oCon; private Microsoft.AnalysisServices.AdomdClient.AdomdConnec tion oCon { get { // Create a new connection if there isn't one cached if (_oCon==null ) _oCon = (adomdp.AdomdConnection)HttpContext.Current.Sessio n[this.ID + "_oCon"]; return( _oCon ); } set { _oCon = value; HttpContext.Current.Session.Add(this.ID + "_oCon",_oCon); } } now from what I understand in the MSDN - this is as designed, the connection will pool and not actually close when the object goes out of scope... so a request for an identical connection will retain the old one. Am I missing something? - Lawren |
![]() |
| Thread Tools | |
| Display Modes | |
| |