Home > Cannot Serialize > Cannot Serialize Interface System.linq.iqueryable 1

Cannot Serialize Interface System.linq.iqueryable 1


at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) –MR.alaa Jul 3 '14 at 14:47 | show 1 more comment active oldest votes Know someone who can answer? How can I get around this? more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed As a quick check: does it work if you return Employee[] or List instead of IEnumerable ? –Marc Gravell♦ Jul 3 '14 at 10:23 Which web method from your check over here

The XML serializer won't be able to handle it. –Evan M Feb 1 '12 at 20:18 1 I think you are saying that you CANNOT modify the methods that are Not the answer you're looking for? more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed public IEnumerable GetNextForSlideshow(string mylistItem,int cnter) { } Sean 0 Comment Question by:MrAgile Facebook Twitter LinkedIn Email https://www.experts-exchange.com/questions/23669121/Cannot-serialize-interface-System-Collections-Generic-IEnumerable.htmlcopy LVL 37 Best Solution bygregoryyoung public List GetNextForSlideshow(string i thought about this

Cannot Serialize Interface System.collections.generic.ienumerable Web Service

What should I do to make it work with those methods with IEnumerable as one of its parameters? Then, we create a transparent proxy for that class, capture method calls, serialize them, and invoke the real method.. –uni Feb 1 '12 at 20:08 add a comment| up vote 7 Visit our UserVoice Page to submit and vote on ideas! Your Email This email is in use.

All rights reserved. This is mo… .NET Programming Resolving Remote Windows Azure IP Addresses Article by: azarc3 Today I had a very interesting conundrum that had to get solved quickly. try to add a debug point at the toarray function call and then see exactly what type is being returned, by right you should only return array of primitive types MVP Cannot Serialize Member Because It Is An Interface Also, may want to consider the ShouldSerialize* pattern.

Feb 28, 2012 07:00 AM|Morignus|LINK I have fixed it. [WebMethod] public string[] NabidniCPN(string prefixText) { LINQDataContext db = new LINQDataContext(); return db.spAPWeb_VyhledejDleCPN(prefixText).Select(n => n.cisloZbozi).ToArray(); } This works great and it is How to install Mediawiki in Ubuntu Ballpark salary equivalent today of "healthcare benefits" in the US? If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.Would you like to participate? http://stackoverflow.com/questions/9102234/xmlserializer-wont-serialize-ienumerable 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

Was a massive case of voter fraud uncovered in Florida? Ienumerable To List Permalink Posted 3-Jul-14 2:45am Raul Iloc73.2K Add a Solution Add your solution here B I U S small BIG code Plain TextC++CSSC#Delphi / PascalF#HTML / XML / ASPJavaJavascriptObjective-CSQLSwiftPerlPHPPythonVBXMLvar < > Thanks Rahul Parmar Error.png Veronica Admin 1213 posts Posted 03 Jan 2011 Link to this post Hello Rikin Shah, Please take a look at this forum post for an answer. return query.ToList(); } Your trying to serialize a representation of the data, the linq query itself, instead of the data resulting from executing the query, thats why it isnt working.

C# Serialize Ienumerable

You will not be able to do it with the XML serializer. –Joe Feb 1 '12 at 20:04 You'll have to use a different serializer. Say, for example, someone passes a non-serializable argument that inherits from IEnumerable. Cannot Serialize Interface System.collections.generic.ienumerable Web Service 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 Binaryformatter Serialize Ienumerable All Rights Reserved.

Terms of UseSite FeedbackPrivacy Policy Powered by Progress Sitefinity August 18, 2014 Cannot serialize interface System.Collections.Generic.IEnumerable Error I was trying to do some sample applications with Entity Framework and Web Service. check my blog So the final code looks like this: public Table1() { this.Table2s = new HashSet(); } [XmlIgnore] public virtual ICollection Table2s { get; set; } Posted by Ayani After spending lot of time on this, finally figured out the solution from stackoverflow link: http://stackoverflow.com/questions/3630052/xml-serialization-problem-in-c-sharp-asp-net All public properties defined in the code are visible to the xml serializer, and it Are there continuous functions for which the epsilon-delta property doesn't hold? Serialize Ienumerable To Json

Do you need your password? Privacy Statement| Terms of Use| Contact Us| Advertise With Us| CMS by Umbraco| Hosted on Microsoft Azure Feedback on ASP.NET| File Bugs| Support Lifecycle 12,577,356 members (56,981 online) Sign in Email Powered by Blogger. this content Is adding the ‘tbl’ prefix to table names really a problem?

Browse other questions tagged c# asp.net kendo-ui or ask your own question. Datacontractserializer Typesetting text with math Need to change cash to cashier's check without bank account (Just arrived to the US) Teenage daughter refusing to go to school Converting the weight of a Privacy statement Help us improve MSDN.

So, then, can you modify the code that attempts to serialize this data and change any IEnumerable objects by using the .ToList() method on them before the serialization attempt is made?

Is it anti-pattern if a class property creates and returns a new instance of a class? Join and Comment By clicking you are agreeing to Experts Exchange's Terms of Use. MenuExperts Exchange Browse BackBrowse Topics Open Questions Open Projects Solutions Members Articles Videos Courses Contribute Products BackProducts Gigs Live Courses Vendor Services Groups Careers Store Headlines Website Testing Ask a Question Xmlserializer Privacy Policy Site Map Support Terms of Use Developer Network Developer Network Developer :CreateViewProfileText: Sign in MSDN subscriptions Get tools Downloads Visual Studio MSDN subscription access SDKs Trial software Free downloads

If this doesn't helps could you please send me a sample project so I can inspect it and help you? Could you please needful for above issue. Learning resources Microsoft Virtual Academy Channel 9 MSDN Magazine Community Forums Blogs Codeplex Support Self support Programs BizSpark (for startups) Microsoft Imagine (for students) United States (English) Newsletter Privacy & cookies http://sauvblog.com/cannot-serialize/cannot-serialize-interface-system-data-idatareader.html AirlineSearchStrong might need to be marked [Serializable()] share|improve this answer answered Sep 23 '11 at 2:50 asawyer 12.4k43566 I get Cannot serialize interface System.Collections.Generic.IEnumerable`1[[Travel_Reservation‌_System.Services.Air‌lineSearchService+Ai‌rlineSearchStrong, Travel Reservation System, Version=, Culture=neutral,

Moving a member function from base class to derived class breaks the program for no obvious reason How to be Recommended to be a Sitecore MVP How to give Permission to Why is this C++ code faster than my hand-written assembly for testing the Collatz conjecture? Feb 27, 2012 02:02 AM|kwanann|LINK since this is a string type, it means that the to array function returnsa string array i.e publicstring[] NabidniCPN(string prefixText) MVP ASP.NET C# View my What is the temperature of the brakes after a typical landing?

If I receive written permission to use content from a paper without citing, is it plagiarism? See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal. By default only the system primitive types and arrays of these primitive types (like int, float, double, string) can be used. 2.If you want to use your own classes as parameters Why there are no approximation algorithms for SAT and other decision problems?

Tank-Fighting Alien Antonym for Nourish What is the temperature of the brakes after a typical landing? Regards,Mostafa arafa Post navigation Previous PostCloud Computing Presentation - AzureNext PostMicrosoft Translator - Bing Leave a Reply Cancel reply Your email address will not be published. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back