This blog post is yet another debugging tip for WCF Data Services that helped me out recently when working on my current project.

I did some heavy refactoring of the database and all of a sudden things just didn’t work. On the coding side of things ,thanks to EntityFramework, it was a doddle to pick up any compile time errors. Fixed those up quick sharp and ran the project and all of sudden no data was appearing on the site.

Hmmm what to do???

The first port of call was my usual debugging steps which I have blogged about in the past but alas they did not help to identify the problem. You can see my previous debugging tips here.

using Fiddler just showed me the generic error shown below:

image

Not very useful at all and it gives no hint as to what the problem is.

So it was off to Bingsville for a quick hunt around and I found a thread in a news group which led me to add the following attribute declaration to the top of my service:

Code Snippet
1. [System.ServiceModel.ServiceBehavior(IncludeExceptionDetailInFaults = true)]
2. publicclassArtistService : DataService<Highway125Entities>

As soon as I did this the error was as plain as day and it was that I had changed one of my database fields to the SQL Type of Time.

So I had forgotten that EntityFramework does not yet support the Time type. Not a problem, I am sure it will in the future.

Regardless, adding the above attribute to you rservice declaration can make debugging these types of issues a whole lot easier.

Hope that helps someone else.

Cheers.

BondiGeek