I've read the threads involving the requirement that ASP.Net session state be set to InProc when using MapSuite WebEdition. Is there any chance of this limitation being removed with subsequent releases of MapSuite WebEdition 3.0?
Bob Mc.
I've read the threads involving the requirement that ASP.Net session state be set to InProc when using MapSuite WebEdition. Is there any chance of this limitation being removed with subsequent releases of MapSuite WebEdition 3.0?
Bob Mc.
Bob,
That is something we are working on right now. During the main development phase we made sure all classes were serializable so we could use SQL State or other methods in Asp.net. We found however that with the latest code there were some issues so now we are testing again with non-in-proc state to make sure the Web Edition supports this.
David
I saw another thread (gis.thinkgeo.com/Support/DiscussionForums/tabid/143/aff/12/aft/5095/afv/topic/Default.aspx) that noted that the SQL Server session state problem had been corrected. However, I’m still unable to use SQL Server session state with the latest build. Has this problem resurfaced?
Bob Mc.
Bob,
Can you clarify on the error itself? We are running Cygnus Track which has very complex maps using the SQL Session state and it is working great. It is possible if there is some class that is causing it to fail that we are not using or that you extended. If you have the error message it will be helpful. Did you ever get it working from SQL session state?
David
The version of MapSuite I’m using is “MapSuiteCore:3.1.273;WebEdition:3.1.273”, as reported from the Version property.
The rest of my application works fine with SQL Server session state. When I navigate to the page with the map on it I get a yellow page with the following error:
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.
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. 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.
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:
[SerializationException: Type ‘ThinkGeo.MapSuite.Core.xe544cc7672033263’ in Assembly ‘MapSuiteCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=0828af5241fb4207’ is not marked as serializable.]
System.Runtime.Serialization.FormatterServices.InternalGetSerializableMembers(RuntimeType type) +7733643
System.Runtime.Serialization.FormatterServices.GetSerializableMembers(Type type, StreamingContext context) +258
System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitMemberInfo() +111
System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter) +161
System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter) +51
System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Write(WriteObjectInfo objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo) +7631620
System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck) +461
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck) +134
System.Web.Util.AltSerialization.WriteValueToStream(Object value, BinaryWriter writer) +1577
[HttpException (0x80004005): 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.]
System.Web.Util.AltSerialization.WriteValueToStream(Object value, BinaryWriter writer) +1662
System.Web.SessionState.SessionStateItemCollection.WriteValueToStreamWithAssert(Object value, BinaryWriter writer) +34
System.Web.SessionState.SessionStateItemCollection.Serialize(BinaryWriter writer) +606
System.Web.SessionState.SessionStateUtility.Serialize(SessionStateStoreData item, Stream stream) +239
System.Web.SessionState.SessionStateUtility.SerializeStoreData(SessionStateStoreData item, Int32 initialStreamSize, Byte[]& buf, Int32& length) +72
System.Web.SessionState.SqlSessionStateStore.SetAndReleaseItemExclusive(HttpContext context, String id, SessionStateStoreData item, Object lockId, Boolean newItem) +116
System.Web.SessionState.SessionStateModule.OnReleaseState(Object source, EventArgs eventArgs) +560
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
Bob Mc.
Hi Bob,
It seems like there is some internal class in MapSuiteCore is not marked Serializable based on the stack trace information. However, it is hard to figure out which class raises this problem without further information, so could you please give us some code or simple sample so that we can look into this issue to fix it.
Sorry for the inconvenience and any more information about this is appreciated.
Thanks,
Sun
Bob,
Finally, we have found the class that is not marked serializable and reproduced the issue you mentioned. And we also found that this problem has been fixed in the latest public release version (3.1.299), so please get this version of WebEdition to have a try.
Any more questions please let me know.
Thanks,
Sun
Sun,
There’s a significant problem with your suggestion. When I try to install the 3.1.299 build it fails with error 1001 claiming my serial number cannot be activated. I copied the serial number twice from my download page so I’m sure I entered it correctly.
Please advise.
Bob Mc.
Bob,
You have to un-install the previous installed version. Please advise…
David
Bob,
The other option is to get you the dll pack which just has the bits and not the samples etc or the installer.
David
David,
Sorry, that doesn’t work. I had already uninstalled the prior version, being quite familiar with the upgrade “drill” for MapSuite. I even went as far as removing the ThinkGeo folder from my Program Files folder, but that doesn’t work either.
I am also unable to get build 3.1.273 installed either. Apparently my serial number has been revoked. Can someone please investigate?
Thanks you,
Bob Mc.
Bob,
We found the issue and it should be fixed. We reset the activations with the full releases across the board. We ignored the history up to a certain date but the date was too early (15th) and you happened to do an activation on the 15th which got caught in the system as a new activation. We have moved the date to when we really released.
Sorry for the inconvenience, we have had tons of since the new release and yours is the first snag.
David
David,
Sorry, I screwed it up this time. I inadvertently installed build 3.1.273 instead of 3.1.299. When I uninstalled 273 and attempted to install 299 I got the activation error again.
However, if this is going to happen every time I try to upgrade it’s going to be a problem, isn’t it?
Thanks,
Bob Mc.
Please help! Urgent! I now cannot get any version installed (again) and I am unable to work on my project.
Bob Mc.
Bob,
Please call the support line and the can help you out.
David
I just did David. Interestingly, the support rep said that they were going to track you down. Sorry.
Bob Mc.
Ryan got me squared away David. Thanks to you both.
Bob Mc.
Bob,
Glad you got things running.
David
I'm not certain the session state is has been corrected folks.
Please see the attached sample project for the problem I'm seeing. When session state is set to InProc the sample works just fine. When I set it to either StateServer or SQLServer I get an error when attempting to retrieve features for the shape file overlay.
Bob Mc.
Hi Bob,
This issue is because that some fields in our map object's state lost during the serialization process; here is a work around for you. We created a custom class “EncodedShapeFileFeatureLayer” which inherits from “ShapeFileFeatureLayer”, and override the “DrawCore ()” method. One thing we need to point out is that, we need to close the projection manually after we used it. Here is the code.
shapeFileFeatureLayer.FeatureSource.Projection.Close ();
Please have a look at the attached sample.
If you have more questions, please let us know.
Thanks,
Howard
1492-ThinkGeo_Session_State_Issue.zip (89.6 KB)