Home > error serializing > error serializing value system collections generic list

Error Serializing Value System Collections Generic List

Contents

here for a quick overview of the site Help Center Detailed answers to cannot serialize interface system collections generic ilist any questions you might have Meta Discuss the workings and sys webforms pagerequestmanagerservererrorexception error serializing value policies of this site About Us Learn more about Stack Overflow the company Business Learn cannot serialize interface system collections generic idictionary more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community

Cannot Serialize Generic List

Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up How to serialize a ViewState objects up vote 0 down vote favorite I have some functions that query a database and puts the result into a gridview. xml serialize ilist It also sets a ViewState variable that contains the results of the query. When I postback, I have a load function that loads the gridview from the last results if any. The Problem I am having is that I am getting an error that basically says that the viewstate object needs to be serialized. From what I have I am not sure how to do this. Error: Sys.WebForms.PageRequestManagerServerErrorException: Error serializing value 'System.Collections.Generic.List1[<>f__AnonymousType172[System.Int32,System.String]]' of type 'System.Collections.Generic.List1[[<>f__AnonymousType172[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], App_Web_rjb524gi, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]].' My code so far: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using System.Runtime.Serialization; public partial class PlayersManagement : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { LoadData(); } } public void LoadData() { if (ViewState["CurrentGridView"] != null || ViewState["CurrentGridView"] == "") { GridViewPlayers.DataSource = ViewState["CurrentGridView"]; GridViewPlayers.DataBind(); } else { DBModel.DBEntities context = new

SQL Server 2014 Express resources Windows Server 2012 resources Programs MSDN subscriptions Overview Benefits Administrators Students Microsoft Imagine Microsoft Student Partners ISV Startups TechRewards Events Community Magazine Forums Blogs Channel 9 error serializing value of type Documentation APIs and reference Dev centers Retired content Samples We’re sorry.

Argumentexception Error Serializing Value 'system.collections.generic.list 1

The content you requested has been removed. You’ll be auto redirected in 1 second. Ask a question Quick

Serializableattribute

access Forums home Browse forums users FAQ Search related threads Remove From My Forums Answered by: How to serialize System.Collections.Generic.IList? Archived Forums A-B > ASMX Web Services and XML http://stackoverflow.com/questions/24191054/how-to-serialize-a-viewstate-objects Serialization Question 0 Sign in to vote Does anyone know if there is a way to serialize a System.Collections.Generic.IList? I'm receiving the following exception, Cannot serialize interface System.Collections.Generic.IList`1[[System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it https://social.msdn.microsoft.com/Forums/en-US/8cb7b9c0-03b3-4af9-9762-d7e2654f7c17/how-to-serialize-systemcollectionsgenericilist?forum=asmxandxml originated in the code. Exception Details: System.NotSupportedException: Cannot serialize interface System.Collections.Generic.IList`1[[System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].when I try to do something like the following. [WebMethod] public IList GenericTest() { IList l = new List(); l.Add("string #1"); return l; }However, if I use the non-generic IList interface, it works just fine. Normally, I would just use a System.Collections.Generic.List instead, but, what I'm trying to serialize is a domain object that I use with NHibernate. i.e. you can't use List, you have to use an IList because NHibernate will assign it's own IList implementation for you. [WebMethod] public System.Collections.IList NonGenericTest() { System.Collections.IList l = new System.Collections.ArrayList(); l.Add("string #1"); return l; } Wednesday, April 26, 2006 5:48 PM Answers 0 Sign in to vote There isn't a good workaround for this unfortunately.  There's some suggestions here:   http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1376732&SiteID=1 Thursday, August 23, 2007 7:52 PM Moderator All replies 0 Sign in to vote try this...    Code Snippet    public class StringList:IList    {        public StringList():base(){}    }    [WebMethod]    public StringList GenericTest()    {        StringList l = new StringList();        l.Add("string #1");        return l;   

Marketing Community Engagement  Ideas  Answers  Discussions  Groups  Wikis  Events Mobile ReadyEvoq Intranet Governance Employee Portal Collaboration Gamification User Profiles Personalization Document Management Analytics IntegrationsEvoq: CMS FeaturesEvoq OnDemandProduct DemosCompare ProductsCompare DNN Platform to Evoq Solutions Customer EngagementMarketing & ECommerceCustomer SupportProduct DevelopmentMember EngagementEmployee IntranetOur Customers Learn More Test DrivesSchedule A http://www.dnnsoftware.com/forums/threadid/449504/scope/posts/error-serializing-value DemoWebinarsWhite PapersProduct ManualsRequest PricingData SheetsCase StudiesVideosEvoq Preferred Products Content http://www.codeproject.com/Questions/818089/why-viewstate-not-storing-list-collections Management Ecommerce Forms Identity Management and Authentication Site Management Social Themes Partners DNN Partners Partner Directory Become a DNN Partner Community Participate Community Exchange Community Voice Community Showcase Community Forums Working Groups  Members Module ContestLearn Project History Documentation Center Community Blog Video Library Wiki Development Online Help RoadmapConnect DNN MVP Community Leaderboard Community Newsletters Community Events  Community HangoutDownload DNN Forge Language Packs Manuals Nightly error serializing BuildsSecurity Policies Security Center Blog About Leadership Management InvestorsNews Press Releases News Coverage Press KitCareersContact DNN Download DNN Platform Whitepapers Manuals Support Store DNN Modules DNN Themes Store Blog Evoq Preferred Services Login REGISTERBecome a DNNizen > Submit DNN Products Evoq Content Overview Content Creation Workflow Asset Management error serializing value Mobile Responsive Personalization Content Analytics SEO Integrations Security Website Performance Evoq Engage Overview Community Management Gamification Advocate Marketing Community Engagement Mobile Ready Evoq Intranet Governance Employee Portal Collaboration Gamification User Profiles Personalization Document Management Analytics Integrations Evoq: CMS Features Evoq OnDemand Product Demos Compare Products Compare DNN Platform to Evoq Solutions Customer Engagement Marketing & ECommerce Customer Support Product Development Member Engagement Employee Intranet Our Customers Learn More Test Drives Schedule A Demo Webinars White Papers Product Manuals Request Pricing Data Sheets Case Studies Videos Evoq Preferred Products Content Management Ecommerce Forms Identity Management and Authentication Site Management Social Themes Partners DNN Partners Partner Directory Become a DNN Partner Community Participate Community Exchange Community Voice Community Showcase Community Forums Working Group

Tips/Tricks Top Articles Beginner Articles Technical Blogs Posting/Update Guidelines Article Help Forum Article Competition Submit an article or tip Post your Blog quick answersQ&A Ask a Question View Unanswered Questions View All Questions... C# questions Linux questions ASP.NET questions SQL questions VB.NET questions discussionsforums All Message Boards... Application Lifecycle> Running a Business Sales / Marketing Collaboration / Beta Testing Work Issues Design and Architecture ASP.NET JavaScript C / C++ / MFC> ATL / WTL / STL Managed C++/CLI C# Free Tools Objective-C and Swift Database Hardware & Devices> System Admin Hosting and Servers Java .NET Framework Android iOS Mobile SharePoint Silverlight / WPF Visual Basic Web Development Site Bugs / Suggestions Spam and Abuse Watch features Competitions News The Insider Newsletter The Daily Build Newsletter Newsletter archive Surveys Product Showcase Research Library CodeProject Stuff communitylounge Who's Who Most Valuable Professionals The Lounge   The Insider News The Weird & The Wonderful The Soapbox Press Releases Non-English Language > General Indian Topics General Chinese Topics help What is 'CodeProject'? General FAQ Ask a Question Bugs and Suggestions Article Help Forum Site Map Advertise with us About our Advertising Employment Opportunities About Us Ask a Question All Questions All Unanswered FAQ why viewstate not storing list collections ? Rate this: Please Sign up or sign in to vote. See more: ASP.NET Hii , I am trying to mainatain list collections in viewste which is throwing an error I am applying sort order on my table and that sort order i want to use if i click on export button ,.i tried to store in viewste at the time when i apply sort . but getting an exceprtion Posted 12-Sep-14 0:48am Torakami3.7K Add a Solution Comments hypermellow 12-Sep-14 6:56am I doubt anyone will be able to provide you with an answer until you at least post your code, and details of the exception that's raised. Torakami 12-Sep-14 7:48am rough code is displyreport() { viewste["report"]=lstReport; } I tried to use serilizable keyword on the top of class as well InnerException = {"Error serializing value 'System.Collections.Generic.List`1[ActusLibrary.ObjectivesReport]' of type 'System.Collections.Generic.List`1[[ActusLibrary.ObjectivesReport, ActusLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].'"} 1 solution Rate this: Please Sign up or sign in to vote. Solution 1 Accept Solution Reject Solution Just the idea: v

 

Related content

asp.net error serializing value

Asp net Error Serializing Value table id toc tbody tr td div id toctitle Contents div ul li a href Error Serializing Value System Collections Generic List Of Type System Collections Generic List a li li a href Argumentexception Error Serializing Value system collections generic list a li li a href Serializable C a li ul td tr tbody table p here for a relatedl quick overview of the site Help Center sys webforms pagerequestmanagerservererrorexception error serializing value Detailed answers to any questions you might have Meta Discuss p h id Error Serializing Value System Collections Generic List Of Type

c# error serializing value viewstate

C Error Serializing Value Viewstate table id toc tbody tr td div id toctitle Contents div ul li a href Argumentexception Error Serializing Value system collections generic list a li li a href Serializable C a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have relatedl Meta Discuss the workings and policies of this site sys webforms pagerequestmanagerservererrorexception error serializing value About Us Learn more about Stack Overflow the company Business Learn more about p h id Argumentexception Error Serializing Value system collections generic

c# error serializing value of type

C Error Serializing Value Of Type table id toc tbody tr td div id toctitle Contents div ul li a href C Error Serializing Value Viewstate a li li a href Sys webforms pagerequestmanagerservererrorexception Error Serializing Value a li li a href Error Serializing Value System Collections Generic List Of Type System Collections Generic List a li li a href Serializable C a li ul td tr tbody table p here for a relatedl quick overview of the site Help Center p h id C Error Serializing Value Viewstate p Detailed answers to any questions you might have Meta c

error serializing value of type

Error Serializing Value Of Type table id toc tbody tr td div id toctitle Contents div ul li a href Serialization Error In Java a li li a href Error Serializing Value System Collections Generic List Of Type System Collections Generic List a li li a href Argumentexception Error Serializing Value system collections generic list a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this relatedl site About Us Learn more about Stack Overflow the company

error serializing value of type system data datatable

Error Serializing Value Of Type System Data Datatable p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more relatedl about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of million programmers just like you helping each other Join them it only takes a minute Sign up Store DataTable in

error serializing behind stopper

Error Serializing Behind Stopper p To configure it visit relatedl your Profile and look for the Two Step Verification option on the left side We can send codes via email may be slower or you can set up any TOTP Authenticator app on your phone Authy Google Authenticator etc to deliver codes It is highly recommended that you configure this to keep your account safe Cookies Two Factor Auth Now Available Unreal Model Viewer now supports UC Discussion in 'Games' started by urPackage Feb Page of Prev GreatEmerald Khnumhotep Joined Jan Messages Likes Received http www filefront com UC forUT

error serializing value

Error Serializing Value table id toc tbody tr td div id toctitle Contents div ul li a href Error Serializing Object Class a li li a href Error Serializing Value System Collections Generic List Of Type System Collections Generic List a li ul td tr tbody table p here for a quick overview of the site Help Center relatedl Detailed answers to any questions you might have error serializing value of type Meta Discuss the workings and policies of this site About Us sys webforms pagerequestmanagerservererrorexception error serializing value Learn more about Stack Overflow the company Business Learn more about

error serializing the response

Error Serializing The Response table id toc tbody tr td div id toctitle Contents div ul li a href Com Alamofire Serialization Response Error Data a li li a href Domain Com Alamofire Error Serialization Response a li li a href Error Serializing Value Of Type a li ul td tr tbody table p here for a quick relatedl overview of the site Help Center Detailed error serializing the response please check the server logs response class answers to any questions you might have Meta Discuss com alamofire error serialization response the workings and policies of this site About Us

error serializing value system collections generic list 1

Error Serializing Value System Collections Generic List table id toc tbody tr td div id toctitle Contents div ul li a href Sys webforms pagerequestmanagerservererrorexception Error Serializing Value a li li a href Serializableattribute a li ul td tr tbody table p here for a relatedl quick overview of the site Help Center p h id Sys webforms pagerequestmanagerservererrorexception Error Serializing Value p Detailed answers to any questions you might have Meta argumentexception error serializing value system collections generic list Discuss the workings and policies of this site About Us Learn more about Stack Overflow p h id Serializableattribute p

error serializing object class wicket

Error Serializing Object Class Wicket p here for a quick overview of the site Help Center Detailed relatedl answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of million programmers just like you helping each other Join them it only takes a minute Sign up JavaSerializer - Error serializing object -

error serializing object class

Error Serializing Object Class table id toc tbody tr td div id toctitle Contents div ul li a href Org Apache Ibatis Cache Cacheexception Error Serializing Object a li li a href Serializing An Object To Xml In C a li li a href Serializing An Object In Java a li ul td tr tbody table p here for a quick overview relatedl of the site Help Center Detailed answers wicket error serializing object class to any questions you might have Meta Discuss the workings error javaserializer error serializing object class and policies of this site About Us Learn more

error serializing

Error Serializing table id toc tbody tr td div id toctitle Contents div ul li a href Error Serializing Value Of Type a li li a href There Was An Error In Serializing Body Of Message a li li a href Serialization Error In Java a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions relatedl you might have Meta Discuss the workings and policies c error serializing value viewstate of this site About Us Learn more about Stack Overflow the company p h id Error Serializing

error serializing value asp.net

Error Serializing Value Asp net p here for a quick overview of the site relatedl Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of million programmers just like you helping each other Join them it only takes a minute Sign up How to serialize a ViewState objects

error serializing bo business objects

Error Serializing Bo Business Objects p are available JR serialization of business object generates ClassCastException exception WebSphere Process Server V Fix Pack v WebSphere Process Server V Fix Pack v WebSphere Process Server V Fix Pack WebSphere Enterprise Service Bus V Fix Pack Subscribe You can track all active APARs for this component APAR status Closed as program error Error description Serialization of a BO extracted from SOAP message throws classcastexception Local fix Problem summary USERS AFFECTED WebSphere Process Server x users who use the Business Object serialize service PROBLEM DESCRIPTION Serialization of business objects fails with a ClassCastException after

error serializing bo business object

Error Serializing Bo Business Object p lrm Topic Error serializing BO SAXParseException An invalid XML character relatedl reply Latest Post - x f - - T Z by SystemAdmin Display ConversationsBy Date - of Previous Next SystemAdmin D XK Posts Pinned topic Error serializing BO SAXParseException An invalid XML character x f - - T Z Tags Answered question This question has been answered Unanswered question This question has not been answered yet Hi I am using WPS WESB with jms mq export and using default data format SOAP default message format Byte The message comes to MQ is having

error serializing viewstate

Error Serializing Viewstate table id toc tbody tr td div id toctitle Contents div ul li a href Argumentexception Error Serializing Value system collections generic list a li li a href Serializable C a li ul td tr tbody table p here for a quick overview of the site relatedl Help Center Detailed answers to any questions you error serializing value system collections generic list might have Meta Discuss the workings and policies of this site sys webforms pagerequestmanagerservererrorexception error serializing value About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or error serializing

error serializing object. cause java.io.notserializableexception

Error Serializing Object Cause Java io notserializableexception p here for relatedl a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of million programmers just like you helping each other Join them it only takes a minute Sign up Java Serializing an Object

error serializing value object

Error Serializing Value Object table id toc tbody tr td div id toctitle Contents div ul li a href Org Apache Ibatis Cache Cacheexception Error Serializing Object a li li a href Serializing An Object In Javascript a li li a href Serialize Object Php a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to relatedl any questions you might have Meta Discuss the workings error serializing object class and policies of this site About Us Learn more about Stack Overflow p h id Org Apache Ibatis Cache Cacheexception

error serializing bo businessobject

Error Serializing Bo Businessobject p invalid relatedl XML character Unicode x A was found in the element content BOXMLSerializer XML control characters unicode x A jdbc adapter Technote troubleshooting Problem Abstract A database is configured as back-end database for WebSphere Process Server The data within the database is not escaped and text variable chararacters varchar or string data might contain control characters When fetching this data with the WebSphere Adapter for JDBC a runtime exception is thrown because of invalid XML characters Symptom When data is retrieved data from the database a runtime exception is created and the log file