C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » WCF »

Serialization Problem


Posted Date: 24 Oct 2009      Posted By: Banane Soylememki      Member Level: Bronze     Points: 1   Responses: 3



Dear Sirs,

Client call WCF Metod which is Metod1.


void Metod1()
{
string result = "Test";

//And this WCF metod call another WCF metod on another host using with proxy
my_proxy.Metod2(result);
}


void Metod2(object pValue)
{
/Do some process...
}


Its properly work. If I using List<string> instead of string I get serialization error. Like this;

List<string> result = new List<>(string);

What can I do?

Best Regards...






Responses

Author: Anuraj    25 Oct 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

Try creating a Class, which inherits List<String> and mark it as serializable.

Thanks
Anuraj
THIS POSTING IS PROVIDED "AS IS" WITH NO WARRANTIES, AND CONFERS NO RIGHTS.
BEWARE OF BUGS IN THE ABOVE CODE; I HAVE ONLY PROVED IT CORRECT, NOT TRIED IT.
dotnetthoghts



Author: Naganathan    27 Oct 2009Member Level: BronzeRating: 2 out of 52 out of 5     Points: 2

you can specify serializaable in attributes .

Regards,
Naganathan.S



Author: Hari    03 Nov 2009Member Level: GoldRating: 2 out of 52 out of 5     Points: 2

Hi,

MArk your service class with [ServiceKnownType(typeof(List<string>))]

like this
[ServiceKnownType(typeof(List<string>))]
public class Service1:IService1
{
}



Post Reply
You must Sign In to post a response.
Next : WCf Vs Webservices
Previous : Creating and Consuming WCF
Return to Discussion Forum
Post New Message
Category: WCF

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use