Share via


HttpStageProcessingException using WCF Rest Services

I was fiddling around with REST services and came up on an interesting error. Whenever I set a Response Format on the Web Invoke attribute I would get a HttpStageProcessing error. No issues with XML format but when JSON serialization was setup it would throw this error.......A couple of hours later and atleast half a dozen unsuccessful fixes later, I found out the issue: If you dont set a DateTime property on the data contract  to an explicit value you get this issue.....I tried manually setting it to the two extremeities DateTime.MinValue does not serialize successfully whereas DateTime.maxValue does. 

 

If you are stuck with this error this post could possibly save you an hour or so.