title: asp.net web services soap header appearing as parameter in client service call
body: <p>I'm simply attempting to use a soap header for authentication purposes.</p>
  
  <p>After adding a service reference to a client console application, the header shows as the first parameter in list instead of as a member on the client object.</p>
  
  <p>Anyone have any idea what I'm doing wrong?</p>
  
  <p>WebService:</p>
  
  <pre><code>public class Service1 : System.Web.Services.WebService
  {
      public CustomSoapHeader MyHeader;
  
      [WebMethod]
      [SoapHeader("MyHeader")]
      public string HelloWorld()
      {
          return "Hello World";
      }
  
      public class CustomSoapHeader : SoapHeader
      {
          public string SomeProperty { get; set; }
      }
  }
  </code></pre>
  
  <p>Client:</p>
  
  <pre><code>class Program
  {
      static void Main(string[] args)
      {
          Service1SoapClient client = new Service1SoapClient();
          client.HelloWorld(new CustomSoapHeader());
      }
  }
  </code></pre>