Updated some blog posts

by Pieter Brinkman 20. May 2009 10:28

I update two posts:

Cheers,

Pieter

Tags: ,

ASP.Net

WCF webservice error with DBML objects

by Pieter Brinkman 7. May 2009 05:34

When deploying a WCF webservice for a Silverligh application I got the following error:

An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.InvalidOperationException: An exception was thrown in a call to a WSDL export extension: System.ServiceModel.Description.DataContractSerializerOperationBehavior
 contract: http://tempuri.org/:IWebService ----> System.Runtime.Serialization.InvalidDataContractException: Type 'Project.service.HU_BACH.ScPlacemark' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute.

 

As you can see from the error you need to add the [Serializable] attribute to all objects that are used within the webservice. After I did this I got the same error for my Linq to Sql objects generated within my DBML. You can make your Linq to Sql objects serializable by changing the dbml setting Serialization Mode to Unidirectional.


Hope it helps.

Tags: , , , ,

ASP.Net | Linq | Silverlight

Powered by BlogEngine.NET 1.5.0.7
Theme by Mads Kristensen

About Me

My name is Pieter Brinkman I am Solution Architect for Sitecore in The Netherlands. My interests are mainly ASP.NET, MSSQL and Content Management Systems.

Calendar

<<  February 2012  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
2728291234
567891011

View posts in large calendar

RecentComments

Comment RSS

Most comments