This project is read-only.

SerializationException: Unable to find assembly App_Web_e0ii0nxk

Topics: Core
Jan 13, 2016 at 4:52 PM
Edited Jan 13, 2016 at 5:28 PM

After upgrading from Orchard 1.7.1 to Orchard 1.9.x (Jan 11 2016) we are experiencing problems in production server that we don't have in a dev machine. Problem is causing a lot of performance problems (we are thinking on move back to 1.7.x).

I have removed ASP.Net temporary folder then performance improves. But after a while another time same exception and same performance problems.

Can someone help me with the exception we get in the log?

2016-01-13 15:14:40,524 [8] Orchard.ContentManagement.Drivers.Coordinators.ContentPartDriverCoordinator - SanLamberto - SerializationException thrown from IContentPartDriver by PCCom.Catalogo.Drivers.CestaCompraDriver
System.Runtime.Serialization.SerializationException: Unable to find assembly 'App_Web_e0ii0nxk, Version=, Culture=neutral, PublicKeyToken=null'.
at System.Runtime.Serialization.Formatters.Binary.BinaryAssemblyInfo.GetAssembly()
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.GetType(BinaryAssemblyInfo assemblyInfo, String name)
at System.Runtime.Serialization.Formatters.Binary.BinaryConverter.TypeFromInfo(BinaryTypeEnum binaryTypeEnum, Object typeInformation, ObjectReader objectReader, BinaryAssemblyInfo assemblyInfo, InternalPrimitiveTypeE& primitiveTypeEnum, String& typeString, Type& type, Boolean& isVariant)
at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadArray(BinaryHeaderEnum binaryHeaderEnum)
at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
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 System.Web.HttpSessionStateWrapper.get_Item(String name)
at PCCom.Catalogo.Services.Cesta.AlmacenamientoCestaSession.get_Items()
at PCCom.Catalogo.Services.Cesta.CestaCompra.get_Lineas()
at PCCom.Catalogo.Services.Cesta.CestaCompra.get_NumArticulos()
at PCCom.Catalogo.Drivers.CestaCompraDriver.<>c__DisplayClass11.<Display>b__d()
at Orchard.ContentManagement.Drivers.ContentPartDriver1.<>c__DisplayClass22_0.<ContentShape>b__0(BuildShapeContext ctx) in D:\PROYECTOS\B2BB2C\Orchard Multitenant\src\Orchard\ContentManagement\Drivers\ContentPartDriver.cs:line 196
at Orchard.ContentManagement.Drivers.ContentPartDriver
1.<>c__DisplayClass24_0.<ContentShapeImplementation>b__0(BuildShapeContext ctx) in D:\PROYECTOS\B2BB2C\Orchard Multitenant\src\Orchard\ContentManagement\Drivers\ContentPartDriver.cs:line 205
at Orchard.ContentManagement.Drivers.ContentShapeResult.ApplyImplementation(BuildShapeContext context, String displayType) in D:\PROYECTOS\B2BB2C\Orchard Multitenant\src\Orchard\ContentManagement\Drivers\ContentShapeResult.cs:line 45
at Orchard.ContentManagement.Drivers.ContentShapeResult.Apply(BuildDisplayContext context) in D:\PROYECTOS\B2BB2C\Orchard Multitenant\src\Orchard\ContentManagement\Drivers\ContentShapeResult.cs:line 21
at Orchard.ContentManagement.Drivers.CombinedResult.Apply(BuildDisplayContext context) in D:\PROYECTOS\B2BB2C\Orchard Multitenant\src\Orchard\ContentManagement\Drivers\CombinedResult.cs:line 28
at Orchard.ContentManagement.Drivers.Coordinators.ContentPartDriverCoordinator.<>c__DisplayClass9_0.<BuildDisplay>b__0(IContentPartDriver driver) in D:\PROYECTOS\B2BB2C\Orchard Multitenant\src\Orchard\ContentManagement\Drivers\Coordinators\ContentPartDriverCoordinator.cs:line 49
at Orchard.InvokeExtensions.Invoke[TEvents](IEnumerable1 events, Action1 dispatch, ILogger logger) in D:\PROYECTOS\B2BB2C\Orchard Multitenant\src\Orchard\InvokeExtensions.cs:line 17
Jan 13, 2016 at 7:28 PM
Well finally I have fount the source of the problem: If I enable ASP.Net session state based on SQL Server this problem happens.
Eventhough with default session method it works properly.
Any idea of the cause?
Jan 13, 2016 at 8:37 PM
Chatting though Jitter I got the following answers

mattchristenson 20:42
While I don't know anything about this case, if my memory serves me right one limitation of using SQL Server based session management (which is a really dumb move in my opinion - the session is supposed to be memory fast - if you're going to store it to disk why not just store it to disk the traditional way?) is that all of the types you put in the session need to be serializable.
So my first thing to look at if something works with InProc but not SQL is, are the values being put in the session serializable?
but again, using SQL Server for session state seems really dumb to me. It kind of defeats the purpose of having a quick place to put stuff on a per session basis. The only "good" real reason to use it is if an app was designed incorrectly and needs too much ram that you don't have and you need an overnight fix while you do things the right way - put that data in the database in a more traditional way.
You can still utilize the session's expiration to clear data from the disk, and treat it as a temporary store.

sebastienros 20:57
@jersiovic the issue is probably because what you are putting in your sessions is not serializable like @mattchristenson is mentioning
@mattchristenson out of proc sessions are necessary if you have a server farm.

mattchristenson 20:58
Yes, but can't you use a state-server for that?
That essentially puts your data on the ram of a shared machine instead of on the disk of a shared machine, which gives you considerably higher performance.

perstenmar 21:17
Hi, is down "The page cannot be displayed because an internal server error has occurred."
Hope someone here is able to fix it =)

jersiovic 21:25
@mattchristenson I totally agree, it was done in the past as a previous move to port the app to Azure. Finally it never happened. The point is I have been doing a hard work migrating from previous version. Session managemente improvemnts .. for next steps
@sebastienros the point is same object was serialized on previous version without problems.

sebastienros 21:23
yes, but maybe there are some changes in these objects that are not serializable
I know Gert had this exact same issue

jersiovic 21:27
@sebastienros @mattchristenson by the moment I have moved to in proc, and I forget about this problem
@sebastienros ok I will double check
@sebastienros @mattchristenson Thank you so much

mattchristenson 21:26
Glad to be of some help!