实际上我遇到的问题,是这样的,
spread7j替换spread5j
在web.config中 配置 SESION方式如下:
<sessionState cookieless="false" regenerateExpiredSessionId="true" mode="Custom" timeout="10" customProvider="SessionStateStore">
<providers>
<clear/>
<add name="SessionStateStore" type="Goe.CommonPresentation.SessionStateStore" connectionStringName="SessionServices" writeExceptionsToEventLog="false" sessionTime="10000"/>
</providers>
</sessionState>
<httpRuntime maxRequestLength="102400" requestValidationMode="2.0"/>
运行后报错:
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 'gx' in Assembly 'FarPoint.Web.SpreadJ, Version=7.0.4001.2010, Culture=neutral, PublicKeyToken=a5fa960294d899e7' is not marked as serializable.]
System.Runtime.Serialization.FormatterServices.InternalGetSerializableMembers(RuntimeType type) +9472677
System.Runtime.Serialization.FormatterServices.GetSerializableMembers(Type type, StreamingContext context) +247
System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitMemberInfo() +160
System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder) +491
System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder) +54
System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck) +542
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck) +133
System.Web.Util.AltSerialization.WriteValueToStream(Object value, BinaryWriter writer) +1762
[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) +1847
System.Web.SessionState.SessionStateItemCollection.WriteValueToStreamWithAssert(Object value, BinaryWriter writer) +34
System.Web.SessionState.SessionStateItemCollection.Serialize(BinaryWriter writer) +638
Goe.CommonPresentation.SessionStateStore.Serialize(SessionStateItemCollection items) in D:\GSCM_GOE\Goe\CommonPresentation\session\SessionStateStore.vb:428
Goe.CommonPresentation.SessionStateStore.SetAndReleaseItemExclusive(HttpContext context, String id, SessionStateStoreData item, Object lockId, Boolean newItem) in D:\GSCM_GOE\Goe\CommonPresentation\session\SessionStateStore.vb:155
System.Web.SessionState.SessionStateModule.OnReleaseState(Object source, EventArgs eventArgs) +807
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +148
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
与我发出的那个连接所遇到的问题应该是一致的,你们提出的解决思路,我正在验证日文版下是否可行,但遇到vb.net代码下对事件的注册,
Me.FpSpread1.SaveOrLoadSheetState += new FarPoint.Web.Spread.SheetViewStateEventHandler(FpSpread1_SaveOrLoadSheetState)
c#转vb.net问题,vb.net好像不能这么写,
AddHandler fsCommon.SaveOrLoadSheetState, New FarPoint.Web.Spread.SheetViewStateEventHandler(AddressOf fsCommon_SaveOrLoadSheetState)
这么写行吗?
如果代码转换没有问题,经过这么修改后,依然会提示序列化报错,是否需要下载spread更新程序?然后再在后台做以上相应代码处理?
期待你们的帮助,谢谢!!! |