gpt4 book ai didi

c# - 系统.Runtime.Serialization.SerializationException : Member 'LastUpdated' was not found

转载 作者:太空宇宙 更新时间:2023-11-03 15:53:59 26 4
gpt4 key购买 nike

我最近刚刚将我们的 Kentico CMS 升级到最新的修补程序。推送到生产服务器后,我在两台服务器上都收到以下错误。

有没有其他人解决过这个错误?我认为这与缓存有关,但我无法在此处指出问题所在。

我们正在使用

  • 用于 session 状态的 SQL 服务器。
  • 两台服务器都是虚拟机
  • 两台服务器都是最新的 - 补丁等

现在 kentico 建议在两台服务器上重新安装 .net,因为他们认为这是与环境相关的问题。

Elmah 挑选了这个错误并将其发送给我。该站点通过此错误显示得很好。

System.Runtime.Serialization.SerializationException: Member 'LastUpdated' was not found.
Generated: Tue, 01 Jul 2014 23:11:07 GMT

System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.Serialization.SerializationException: Member 'LastUpdated' was not found.
at System.Runtime.Serialization.SerializationInfo.GetElement(String name, Type& foundType)
at System.Runtime.Serialization.SerializationInfo.GetValue(String name, Type type)
at CMS.SettingsProvider.BaseInfo..ctor(SerializationInfo info, StreamingContext context, TypeInfo[] typeInfos)
at CMS.DataEngine.AbstractInfo`1..ctor(SerializationInfo info, StreamingContext context, TypeInfo[] typeInfos)
at CMS.SiteProvider.UserInfo..ctor(SerializationInfo info, StreamingContext context)
at CMS.CMSHelper.CurrentUserInfo..ctor(SerializationInfo info, StreamingContext context)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.SerializationInvoke(IRuntimeMethodInfo method, Object target, SerializationInfo info, StreamingContext& context)
at System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context)
at System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder holder)
at System.Runtime.Serialization.ObjectManager.DoFixups()
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Web.Util.AltSerialization.ReadValueFromStream(BinaryReader reader)
at System.Web.SessionState.SessionStateItemCollection.ReadValueFromStreamWithAssert()
at System.Web.SessionState.SessionStateItemCollection.DeserializeItem(String name, Boolean check)
at System.Web.SessionState.SessionStateItemCollection.get_Item(String name)
at System.Web.SessionState.HttpSessionStateContainer.get_Item(String name)
at CMS.GlobalHelper.SessionHelper.GetValue(String key)
at CMS.CMSHelper.ContextData.GetCurrentUser(Boolean& loadUserData, Boolean cacheResult)
at CMS.CMSHelper.ContextData.get_CurrentUser()
at CMS.UIControls.DocumentBase.get_CurrentUser()
at CMS.UIControls.DocumentBase.SetCulture()
at CMS.UIControls.DocumentBase.PreInit()
at CMS.UIControls.ContentPage.OnPreInit(EventArgs e)
at CMSPages_PortalTemplate.OnPreInit(EventArgs e) in d:\inetpub\NrccuaWeb\Cms20140701-KU\CMSPages\PortalTemplate.aspx.cs:line 142
at System.Web.UI.Page.PerformPreInit()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.cmspages_portaltemplate_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\cms\3bfbd4f3\28ac498a\App_Web_portaltemplate.aspx.67ab7734.p3gr9fmc.0.cs:line 0
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

谢谢。

最佳答案

有点老问题,但由于我刚遇到这个问题,所以我会为下一个人发布解决方案。

当您使用 SQL Server 存储 session 状态时,可能会发生这种情况。

Kentico 将 userinfo 对象存储在 session 中,因此在您升级之前的某个时候,您登录到 kentico 站点并且 userinfo 对象在 SQL Server session 数据库中被序列化。

升级后,当您访问站点时,保存在 session 数据库中的 userinfo 对象被反序列化,因为该对象已被升级更改,因此抛出序列化异常。

您可以等待 session 过期,清除 session cookie,或者如果您想避免站点的任何用户出现问题,请清除 SQL Server session 数据库中的 ASPStateTempSessions 表。

只有默认的 inProc session 状态不会发生这种情况,因为升级完成后站点重新启动会清除它。

关于c# - 系统.Runtime.Serialization.SerializationException : Member 'LastUpdated' was not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24521360/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com