Using header from asp.net client.

Feb 19, 2009 at 4:40 PM
Hi, 
I'm incorporating WCFExtras into my application so that I can use SOAP Headers.
The server side is working perfectly but I'm having a problem with a ASP.Net web application client.

I've added the  <wsdlImporters> section to my web.config as described but I cannot create a partial class for my client.
When you import a Service Reference into a asp.net web application the client proxy that it creates isn't a partial class (at least for me)
so I cannot add the header methods.

The InnerChannel class on the proxy client also has no GetHeader method.

This all works perfectly if I build a console client application.

Can someone point out the obvious to me?

I'm running Visual Studio 2008 with .net 3.5
Feb 20, 2009 at 1:10 PM
For some reason Service References are imported differently into a website project in Visual studio than into 
a web application or other project type.
We have to use website projects because of how we use virtual directories.
The solutions is to have a seperate library project import the service reference and then reference that project from your website.

Everything is working now, thanks for a nice piece of code.