title: C# exception "This stream does not support seek operations." for HttpWebRequest method "PUT"
body: <p><img src="https://i.stack.imgur.com/cihXL.png" alt="enter image description here">I'm using PUT method to update some data. But my below code is not working.     </p>
  
  <p>The code:</p>
  
  <pre><code>var schemaRequest = WebRequest.Create(new Uri(SchemaUri)) as HttpWebRequest;
  schemaRequest.Method = "PUT";
  schemaRequest.ContentType = "text/xml";
  schemaRequest.Credentials = CredentialCache.DefaultNetworkCredentials;
  schemaRequest.Proxy = WebRequest.DefaultWebProxy;
  schemaRequest.AddRange(1024);
  
  string test = "&lt;ArrayOfUpdateNodeRequest&gt; &lt;UpdateNodeRequest&gt;  &lt;Description&gt;vijay&lt;/Description&gt; &lt;Name&gt;Publishing&lt;/Name&gt;&lt;/UpdateNodeRequest&gt;&lt;/ArrayOfUpdateNodeRequest&gt;";
  
  byte[] arr = new byte[1024];
  arr = System.Text.Encoding.UTF8.GetBytes(test);
  schemaRequest.ContentLength = arr.Length;
  
  using (var dataStream = schemaRequest.GetRequestStream())
  {
      dataStream.Write(arr, 0, arr.Length);
  }
  </code></pre>
  
  <p>I'm getting the exception "This stream does not support seek operations." at GetRequestStream().</p>