Jesse Johnston
{ ironic tagline here }

System.ServiceModel.ProtocolException: An HTTP Content-Type header is required

Wednesday, 19 May 2010 16:29 by jesse

The full exception message is “An HTTP Content-Type header is required for SOAP messaging and none was found.”.

If you’re writing a WCF service that returns Entity Framework entities, you may run into this error in your client application.  To correct it, open your EDMX file in the service project and change the Lazy Loading Enabled property to False.

It makes sense that related entities can’t be lazy-loaded after the query results have been returned to the client, but the error message doesn’t make that super-obvious.

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList
Tags:   ,
Categories:   .NET | WCF | EF
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed