Error serializing value

Posts   
 
    
nevernet
User
Posts: 67
Joined: 01-Feb-2010
# Posted on: 25-Oct-2010 11:32:46   
Error serializing value 'Collection of entities of type 'OrderEntity'. Current number of elements: 1' of type 'VPXY.DAL.CollectionClasses.OrderCollection.'

on my local machine ,i didn't got any problem. but after i upload file to godaddy shared hosting, i got this error.

LLBLGen pro 2.6 shared hosting info : economy plan (windows,.net 3.5)

any ideas will be appreciated. please advise.

Daniel

Walaa avatar
Walaa
Support Team
Posts: 14825
Joined: 21-Aug-2005
# Posted on: 25-Oct-2010 12:34:02   

Any stack trace, please?

(Edit) might be related to this thread: http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=15446

nevernet
User
Posts: 67
Joined: 01-Feb-2010
# Posted on: 25-Oct-2010 12:39:03   

Yes


UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.41 Safari/534.7
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: 9665a564-07e2-4f27-b0b2-1e8583365be1
InnerException: Error serializing value 'Collection of entities of type 'OrderEntity'. Current number of elements: 1' of type 'VPXY.DAL.CollectionClasses.OrderCollection.'
FileName: 
FileLineNumber: 0
FileColumnNumber: 0
Method: SD.LLBLGen.Pro.ORMSupportClasses.EntityCollectionBase`1.GetObjectData
StackTrace: 
Message: DotNetNuke.Services.Exceptions.PageLoadException: Error serializing value 'Collection of entities of type 'OrderEntity'. Current number of elements: 1' of type 'VPXY.DAL.CollectionClasses.OrderCollection.' ---> System.ArgumentException: Error serializing value 'Collection of entities of type 'OrderEntity'. Current number of elements: 1' of type 'VPXY.DAL.CollectionClasses.OrderCollection.' ---> System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. at SD.LLBLGen.Pro.ORMSupportClasses.EntityCollectionBase`1.GetObjectData(SerializationInfo info, StreamingContext context) at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter) at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter) 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 System.Web.UI.ObjectStateFormatter.SerializeValue(SerializerBinaryWriter writer, Object value) The action that failed was: LinkDemand The type of the first permission that failed was: System.Security.Permissions.SecurityPermission The Zone of the assembly that failed was: MyComputer --- End of inner exception stack trace --- at System.Web.UI.ObjectStateFormatter.SerializeValue(SerializerBinaryWriter writer, Object value) at System.Web.UI.ObjectStateFormatter.Serialize(Stream outputStream, Object stateGraph) at System.Web.UI.ObjectStateFormatter.Serialize(Object stateGraph) at System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Serialize(Object state) at System.Web.UI.Util.SerializeWithAssert(IStateFormatter formatter, Object stateGraph) at System.Web.UI.HiddenFieldPageStatePersister.Save() at System.Web.UI.Page.SavePageStateToPersistenceMedium(Object state) at System.Web.UI.Page.SaveAllState() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace ---

nevernet
User
Posts: 67
Joined: 01-Feb-2010
# Posted on: 25-Oct-2010 12:43:07   

Walaa wrote:

Any stack trace, please?

(Edit) might be related to this thread: http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=15446

same as this post,yes ,i also have LLBLGenProDataSource in the ascx file.

it seems Godaddy shared hosting are running under medium trust level

nevernet
User
Posts: 67
Joined: 01-Feb-2010
# Posted on: 25-Oct-2010 14:21:35   

i have checked that the Godaddy had disabled override the securityPolicy settings. so ,i cannot follow post:[http://www.west-wind.com/Weblog/posts/6344.aspx](http://www.west-wind.com/Weblog/posts/6344.aspx)

is there has any other ways?

Walaa avatar
Walaa
Support Team
Posts: 14825
Joined: 21-Aug-2005
# Posted on: 25-Oct-2010 16:56:00   

Have you tried to use "Session" for the LLBLGenProDataSource CacheLocation property?

CacheLocation="Session"
nevernet
User
Posts: 67
Joined: 01-Feb-2010
# Posted on: 26-Oct-2010 09:00:36   

Walaa wrote:

Have you tried to use "Session" for the LLBLGenProDataSource CacheLocation property?

CacheLocation="Session"

No, i have transferred my site to another shared hosting and this hosting running full trust. because there are some others problems under medium trust.