title: HttpContext.Current is null in my web service
body: <p>I have a web service (.svc), and I am trying to capture the SOAP request using a piece of code found elsewhere on StackOverflow. </p>
  
  <p>The problem is that <code>HttpContext.Current</code> is null, so I can't access <code>Request.InputString</code>. </p>
  
  <p>Why is this null, and how can it be solved?</p>
  
  <pre><code>XmlDocument xmlSoapRequest = new XmlDocument();
  
  Stream receiveStream = HttpContext.Current.Request.InputStream;
  receiveStream.Position = 0;
  
  using (StreamReader readStream = new StreamReader(receiveStream, Encoding.UTF8))
  {
      xmlSoapRequest.Load(readStream);
  }
  </code></pre>