Click here to Skip to main content
15,888,610 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All:

I have this wired problem. I developed a WCF service with three methods. installed in my development server's IIS 6.0 and everything works just file. When I installed it on a production server's IIS 6.0 it's giving the following serialization error. I get the the same error when I try to run svcutil.exe

ms visual studio 2008, framework 3.5, IIS 6.0


contract: http://tempuri.org/:IOptiWeb ----> System.Runtime.Serialization.InvalidDataContractException: Type 'OptiWeb.GetResultRequestLineType' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute.
at System.Runtime.Serialization.DataContract.DataContractCriticalHelper.Throw InvalidDataContractException(String message, Type type)
at System.Runtime.Serialization.DataContract.DataContractCriticalHelper.CreateDataContract(Int32 id, RuntimeTypeHandle typeHandle, Type type)
at System.Runtime.Serialization.DataContract.DataContractCriticalHelper.GetDataContractSkipValidation(Int32 id, RuntimeTypeHandle typeHandle, Type type)


I am think it is something to do with the server security. Any help will be appreciated
Posted
Comments
db7uk 6-May-13 16:56pm    
What object are you returning? If it is a class ( or list of objects) have you correctly decorated the class with DataContract and decorated the properties with DataMember attributes?

Can you provide any code regarding the object(s) you want serialized?

1 solution

Thanks db7uk, the problem has been resolved, when I was responding to you I noticed that one of the sub class didn't have the datacontract attribute. once I added that it started to work just fine. I guess I have a better strust setup with the development server.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900