w3wp.exe进程配置文件确认及SerializationException未解决求助
问题:SerializationException异常未解决,需确认w3wp.exe实际使用的配置文件
遇到SerializationException异常,提示信息:"内部数组无法扩展到超过Int32.MaxValue个元素"(原英文:The internal array cannot expand to greater than Int32.MaxValue elements.)
已知解决方案是在配置文件中添加以下配置项:
<AppContextSwitchOverrides value="Switch.System.Runtime.Serialization.UseNewMaxArraySize=true" />
已在web.config中添加该配置并重启IIS(.NET版本为4.8),但问题仍未解决。
通过Procmon工具查看w3wp.exe进程读取的配置文件路径,发现部分进程对应C:\inetpub\temp\apppools\Archer\Archer.config,另一部分对应C:\inetpub\temp\apppools\DefaultAppPool\DefaultAppPool.config。
现需确认出现该异常的w3wp.exe进程实际使用的配置文件,相关堆栈跟踪信息如下:
<InnerException> <ExceptionType>System.InvalidOperationException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType> <Message>Unable to find html field value for typename 'Field'</Message> <Source>CompanyTech.Notifications</Source> <StackTrace> at CompanyTech.Notifications.xslt.NotificationXslExtensions.LookupValue(XPathNodeIterator lookupDefinition, XPathNodeIterator objectIdXPath, String pluginPrefix)</StackTrace> <InnerException> <ExceptionType>System.Runtime.Serialization.SerializationException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType> <Message>The internal array cannot expand to greater than Int32.MaxValue elements.</Message> <Source>mscorlib</Source> <StackTrace> at System.Runtime.Serialization.ObjectIDGenerator.Rehash() at System.Runtime.Serialization.ObjectIDGenerator.GetId(Object obj, Boolean& firstTime) at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.InternalGetId(Object obj, Boolean assignUniqueIdToValueType, Type type, Boolean& isNew) at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Schedule(Object obj, Boolean assignUniqueIdToValueType, Type type, WriteObjectInfo objectInfo) at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteMembers(NameInfo memberNameInfo, NameInfo memberTypeNameInfo, Object memberData, WriteObjectInfo objectInfo, NameInfo typeNameInfo, WriteObjectInfo memberObjectInfo) at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteMemberSetup(WriteObjectInfo objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo, String memberName, Type memberType, Object memberData, WriteObjectInfo memberObjectInfo) at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Write(WriteObjectInfo objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo, String[] memberNames, Type[] memberTypes, Object[] memberData, WriteObjectInfo[] memberObjectInfos) at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Write(WriteObjectInfo objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo) at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck) at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck) at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph) at CompanyTech.Notifications.ContentRender.LevelRecordDataContainerDeepCopy(LevelRecordDataContainer levelRecordDataContainer) at CompanyTech.Notifications.ContentRender..ctor(IRenderEngine engine, Content content, LevelRecordDataContainer levelRecordDataContainer) at CompanyTech.Notifications.Rendering.RenderEngine.GetFieldHtml(Int32 contentId, Int32 fieldId) at CompanyTech.Notifications.Providers.Value.ArcherContentNotificationValueProvider.GetHtmlReplacement(String objectId, ValuePlaceholder valuePlaceholder) at CompanyTech.Notifications.xslt.NotificationXslExtensions.LookupValue(XPathNodeIterator lookupDefinition, XPathNodeIterator objectIdXPath, String pluginPrefix)</StackTrace> </InnerException> </InnerException>
内容的提问来源于stack exchange,提问作者Ranjith
相关产品推荐
相关产品推荐

