This is a strange problem that I am having with WCF trying to send DataTable in the response. I have the following service contract:
[ServiceContract]
public
While I admit that sending DataSets and DataTables via services is BAD and I actually have changed it so I am not doing so, the root of the problem lied elsewhere.
For those that absolutely HAVE to use DataTables/DataSets, the error I was getting was because I was trying to send a DbNull object. I guess it is not serializable or there is some other reason it refused to send it.
After manually "converting" DbNull into null (I had to do this to extract data into my own custom DataContract anyways), the error was gone and it worked!