InnerChannel.SetHeader throws NullReferenceException

Jan 10, 2011 at 12:53 PM

I have service and WCF client that I want to make use of soap header support.

I set up everything according to http://wcfextras.codeplex.com/wikipage?title=HowToUse&referringTitle=Home

My WCF client works but throws NullReferenceException on both:
client.InnerChannel.SetHeader("myHeader", new local.Header()); 
and
var header = client.InnerChannel.GetHeader<local.Header>("myHeader");

I wonder if web.config element <wsdlExtensions location="noidea" singleFile="True"/> might cause a problem because I don't know what type in location attribute. I simply tried to type service address but it didn't fix anything.