locked
Getting an exception "The value for one of the http headers is not in correct format". RRS feed

  • Question

  • Getting an exception "The value for one of the http headers is not in correct format". I am using Development storage. Please help!
    Monday, April 22, 2013 5:39 AM

Answers

  • Of course...you will get a bad request error (400) on the list...please let me know if can get the blob in the container

    http://127.0.0.1:10000/devstoreaccount1/certificatefilesblob/referencefilesblob

    also, if you can send me code snippet of your CloudStorageAccount object creation till container.createifnotexists method call...that will help.

    Ideally, I am not aware of any http-headers applied at container level...it is blob within the container which has http-headers and that too is a limited and pre-defined set. Of course, you can add meta-data for the blob in addition.

    Monday, April 22, 2013 4:33 PM

All replies

  • Can you add more details here? In the meantime, you can try using 3rd party tools like neudesic Azure storage explorer and check the content header to ascertain the http headers set.
    Monday, April 22, 2013 6:00 AM
  • I am using neudesic Azure storage explorer only. And have a DevStorage there, with two blobs.

    The Web.config file reads as:

    <add key="DataConnectionString" value="UseDevelopmentStorage=true"/>
    <add key="AccountName" value="devstoreaccount1"/>
    <add key="AccountSharedKey" value="Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw=="/>
    <add key="QueueEndPoint" value="http://127.0.0.1:10001/devstoreaccount1"/>
    <add key="BlobEndPoint" value="http://127.0.0.1:10000/devstoreaccount1"/>
    <add key="TableEndPoint" value="http://127.0.0.1:10002/devstoreaccount1"/>
    <add key="TableStorageEndpoint" value="http://127.0.0.1:10002/devstoreaccount1"/>
    <add key="BlobStorageEndpoint" value="http://127.0.0.1:10000/devstoreaccount1"/>
    <add key="CertificateFilesBlob" value="certificatefilesblob"/>
    <add key="ReferenceFilesBlob" value="referencefilesblob"/>
    Monday, April 22, 2013 6:49 AM
  • And

    container.CreateIfNotExist(); triggers the exception. Container is certificatefilesblob.

    Please help!

    Monday, April 22, 2013 6:51 AM
  • Try this:

    CloudStorageAccount csa = CloudStorageAccount.Parse("UseDevelopmentStorage=true");

    CloudBlobClient cbc = csa.CreateCloudBlobClient();             CloudBlobContainer cbctr = cbc.GetContainerReference("test"); cbctr.CreateIfNotExist();


    Monday, April 22, 2013 7:15 AM
  •  It still gives the same exception :(
    Monday, April 22, 2013 10:50 AM
  • Please confirm you are using the 

    CloudStorageAccount csa = CloudStorageAccount.Parse("UseDevelopmentStorage=true");

    and NOT DefaultEndPoint=https;accountname<>;accountkey<> syntax. 

    The account name, account key syntax does not work for me in compute emulator anymore. Also, note the container names are all lowercase (which is fine in your case). Can you share your code snippet here?

    Monday, April 22, 2013 11:03 AM
  • Did this work for you...http://127.0.0.1:10000/devstoreaccount1/certificatefilesblob/referencefilesblob..assuming that certificatefilesblob is public container/public blob? Did you try restarting emulator?
    Monday, April 22, 2013 11:17 AM
  • The Web.config file reads as:

    ="http://127.0.0.1:10000/devstoreaccount1"/>
    <add key="TableEndPoint" value="http://127.0.0.1:10002/devstoreaccount1"/>
    <add key="TableStorageEndpoint" value="http://127.0.0.1:10002/devstoreaccount1"/>
    <add key="BlobStorageEndpoint" value="http://127.0.0.1:10000/devstoreaccount1"/>
    <add key="CertificateFilesBlob" value="certificatefilesblob"/>
    <add key="ReferenceFilesBlob" value="referencefilesblob"/>

    And also
    http://127.0.0.1:10000/devstoreaccount1/certificatefilesblob throws a Bad Request Error(400) and I had created the blob as Public Blob

    Monday, April 22, 2013 12:48 PM
  • sorry portion of the reply was deleted

    The Web.config file reads as:

    <add key="DataConnectionString" value="UseDevelopmentStorage=true"/>
    <add key="AccountName" value="devstoreaccount1"/>
    <add key="AccountSharedKey" value="Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw=="/>
    <add key="QueueEndPoint" value="http://127.0.0.1:10001/devstoreaccount1"/>
    <add key="BlobEndPoint" value="http://127.0.0.1:10000/devstoreaccount1"/>
    <add key="TableEndPoint" value="http://127.0.0.1:10002/devstoreaccount1"/>
    <add key="TableStorageEndpoint" value="http://127.0.0.1:10002/devstoreaccount1"/>
    <add key="BlobStorageEndpoint" value="http://127.0.0.1:10000/devstoreaccount1"/>
    <add key="CertificateFilesBlob" value="certificatefilesblob"/>
    <add key="ReferenceFilesBlob" value="referencefilesblob"/>
    Monday, April 22, 2013 12:50 PM
  • Of course...you will get a bad request error (400) on the list...please let me know if can get the blob in the container

    http://127.0.0.1:10000/devstoreaccount1/certificatefilesblob/referencefilesblob

    also, if you can send me code snippet of your CloudStorageAccount object creation till container.createifnotexists method call...that will help.

    Ideally, I am not aware of any http-headers applied at container level...it is blob within the container which has http-headers and that too is a limited and pre-defined set. Of course, you can add meta-data for the blob in addition.

    Monday, April 22, 2013 4:33 PM