I am coding a module and I am placing Info object to ViewState so on postback I would get it from ViewState and getting this error message. Any ideas what is going on? From the error message I assume it has something to do with how ASP.net handles viewstate.....
Update: If I place any Info Objects in any (even in core) modules to ViewState - it will give Security Exception... Is it ASP.NET? DNN? or what ... problem and is there a slolution?
Request for the permission of type System.Security.Permissions.SecurityPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
Message: DotNetNuke.Services.Exceptions.PageLoadException: Request for the permission of type System.Security.Permissions.SecurityPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed. ---> System.Security.SecurityException: Request for the permission of type System.Security.Permissions.SecurityPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed. at System.Security.CodeAccessSecurityEngine.CheckHelper(PermissionSet grantedSet, PermissionSet deniedSet, CodeAccessPermission demand, PermissionToken permToken) at System.Security.CodeAccessSecurityEngine.Check(PermissionToken permToken, CodeAccessPermission demand, StackCrawlMark& stackMark, Int32 checkFrames, Int32 unrestrictedOverride) at System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap, StackCrawlMark& stackMark, PermissionType permType) at System.Security.CodeAccessPermission.DemandInternal(PermissionType permissionType) 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.LosFormatter.SerializeValue(TextWriter output, Object value) at System.Web.UI.LosFormatter.SerializeValue(TextWriter output, Object value) at System.Web.UI.LosFormatter.SerializeValue(TextWriter output, Object value) at System.Web.UI.LosFormatter.SerializeValue(TextWriter output, Object value) at System.Web.UI.LosFormatter.SerializeValue(TextWriter output, Object value) at System.Web.UI.LosFormatter.SerializeValue(TextWriter output, Object value) at System.Web.UI.LosFormatter.SerializeValue(TextWriter output, Object value) at System.Web.UI.LosFormatter.SerializeValue(TextWriter output, Object value) at System.Web.UI.LosFormatter.SerializeValue(TextWriter output, Object value) at System.Web.UI.LosFormatter.SerializeValue(TextWriter output, Object value) at System.Web.UI.LosFormatter.SerializeValue(TextWriter output, Object value) at System.Web.UI.LosFormatter.SerializeValue(TextWriter output, Object value) at System.Web.UI.LosFormatter.SerializeValue(TextWriter output, Object value) at System.Web.UI.LosFormatter.SerializeValue(TextWriter output, Object value) at System.Web.UI.LosFormatter.SerializeValue(TextWriter output, Object value) at System.Web.UI.LosFormatter.SerializeValue(TextWriter output, Object value) at System.Web.UI.LosFormatter.SerializeValue(TextWriter output, Object value) at System.Web.UI.LosFormatter.SerializeValue(TextWriter output, Object value) at System.Web.UI.LosFormatter.SerializeValue(TextWriter output, Object value) at System.Web.UI.LosFormatter.SerializeValue(TextWriter output, Object value) at System.Web.UI.LosFormatter.SerializeValue(TextWriter output, Object value) at System.Web.UI.LosFormatter.SerializeValue(TextWriter output, Object value) at System.Web.UI.LosFormatter.SerializeValue(TextWriter output, Object value) at System.Web.UI.LosFormatter.SerializeValue(TextWriter output, Object value) at System.Web.UI.LosFormatter.SerializeValue(TextWriter output, Object value) at System.Web.UI.LosFormatter.SerializeValue(TextWriter output, Object value) at System.Web.UI.LosFormatter.SerializeInternal(TextWriter output, Object value) at System.Web.UI.Page.OnFormRender(HtmlTextWriter writer, String formUniqueID) at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) at System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at ASP.Default_aspx.__Render__control1(HtmlTextWriter __output, Control parameterContainer) in c:\inetpub\wwwroot\DotNetNuke\Default.aspx:line 27 at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.Control.Render(HtmlTextWriter writer) at DotNetNuke.Framework.PageBase.Render(HtmlTextWriter writer) in c:\inetpub\wwwroot\DotNetNuke\components\Shared\PageBase.vb:line 528 at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Page.ProcessRequestMain() --- End of inner exception stack trace ---