title: Azure Blob: "The condition specified using HTTP conditional header(s) is not met"
body: <p>I got this exception when I run my application. It happens also in the real Azure blob storage.</p>
  
  <p>I've caught with Fiddler the request that creates this problem:</p>
  
  <pre><code>GET http://127.0.0.1:10000/devstoreaccount1/ebb413ed-fdb5-49f2-a5ac-74faa7e2d3bf/8844c3ec-9e4b-43ec-88b2-58eddf65fc0a/perro?timeout=90 HTTP/1.1
  x-ms-version: 2009-09-19
  User-Agent: WA-Storage/6.0.6002.18006
  x-ms-range: bytes=0-524304
  If-Match: 0x8CDA190BD304DD0
  x-ms-date: Wed, 23 Feb 2011 16:49:18 GMT
  Authorization: SharedKey devstoreaccount1:5j3IScY9UJLN3o1ICWKwVEazO4/IDJG796sdZKqHlR4=
  Host: 127.0.0.1:10000
  </code></pre>
  
  <p>And this is the response:</p>
  
  <pre><code>HTTP/1.1 412 The condition specified using HTTP conditional header(s) is not met.
  Content-Length: 252
  Content-Type: application/xml
  Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
  x-ms-request-id: fbff9d15-65c8-4f21-9088-c95e4496c62c
  x-ms-version: 2009-09-19
  Date: Wed, 23 Feb 2011 16:49:18 GMT
  
  &lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;Error&gt;&lt;Code&gt;ConditionNotMet&lt;/Code&gt;&lt;Message&gt;The condition specified using HTTP conditional header(s) is not met.
  RequestId:fbff9d15-65c8-4f21-9088-c95e4496c62c
  Time:2011-02-23T16:49:18.8790478Z&lt;/Message&gt;&lt;/Error&gt;
  </code></pre>
  
  <p>It happens when I use the Stream retrieved from this line: </p>
  
  <pre><code>blob.OpenRead();
  </code></pre>
  
  <p>Why the ETAG minds in a read operation? How may I avoid this problem?</p>
  
  <p>It happens every time I launch several parallel tasks doing things on the blob storage.</p>
  
  <p>If i use:</p>
  
  <pre><code>blob.OpenRead(new BlobRequestOptions() { AccessCondition = AccessCondition.IfMatch("*") });
  </code></pre>
  
  <p>I got this exception with no inner one (before it had a WebException with the details), either a fail line in Fiddler :</p>
  
  <pre><code>Microsoft.WindowsAzure.StorageClient.StorageClientException was unhandled
    Message=The conditionals specified for this operation did not match server.
    Source=mscorlib
    StackTrace:
      Server stack trace: 
         at Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.get_Result()
         at Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.ExecuteAndWait()
         at Microsoft.WindowsAzure.StorageClient.TaskImplHelper.ExecuteImpl[T](Func`2 impl)
         at Microsoft.WindowsAzure.StorageClient.BlobReadStream.Read(Byte[] buffer, Int32 offset, Int32 count)
         at System.IO.BinaryReader.ReadBytes(Int32 count)
         at System.Runtime.Serialization.Formatters.Binary.SerializationHeaderRecord.Read(__BinaryParser input)
         at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadSerializationHeaderRecord()
         at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
         at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
         at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
         ...........
  </code></pre>
  
  <p>Thanks in advance.</p>