Skip to Content

If you have built a solution with the SAP NetWeaver Gateway productivity accelerator for Microsoft and you experience the following runtime error

“A missing or empty content type header was found when trying to read a message. The content type header is required.”

then this might be related to the Windows Communication Foundation (WCF) version. I have seen this so far only with projects generated in Microsoft Visual Studio 2012. When looking at the HTTP trace I see that Gateway returns a success message and still an exception occurs.

Try the following: Open your project in Visual Studio and open the Package Manager Console (from the menu Tools –> Library Package manager –> Package Manager Console):

GWPaM_Exception1.jpg

Note: If you do not see the menu entry then you have to install the NuGet Package Manager.

The Package Manager Console should now open and here you need to run the following command:

Install-Package Microsoft.Data.Services -Version 5.5.0

GWPaM_Exception2.jpg

This will add the WCF 5.5 libraries to your project. Keep in mind that you will have to do this for each new project.

Now give a try again. This should resolve the “A missing or empty content type header…” exception.

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply