locked
Authentication error while accessing Blobs RRS feed

  • Question

  • I am getting following error while access Blobs container. Could someone please advise me how to fix this?

    x-ms-date:Mon, 02 Feb 2015 10:44:52 GMT
    x-ms-version:2009-09-19
    /satishsplcs1/vsdeploy/
    comp:list
    restype:container'.</AuthenticationErrorDetail></Error>

    API Used - https://code.msdn.microsoft.com/windowsazure/CSAzureStorageRESTAPI-2b9055fb/

    Thanks in advance. 

    Monday, February 2, 2015 10:47 AM

Answers

  • Hi,

    I have tested this sample code on my side, it works well, I only change some values, see my changes below.

    You could also check your code with this article: https://msdn.microsoft.com/en-us/library/azure/dd135734.aspx

    In addition, fiddler (http://www.telerik.com/fiddler) is a good tool to debug this type issue.

    Best Regards,

    Jambor


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Tuesday, February 3, 2015 2:40 AM
  • Hi Satish - I've tested the code and I'm not running into any errors. I only get the AuthenticationErrorDetail error when I provide an invalid account key. As Jambor has mentioned already, please verify the account key you're using is valid for that Storage account. Thanks.
    Thursday, March 5, 2015 11:22 PM

All replies

  • Hi,

    I have tested this sample code on my side, it works well, I only change some values, see my changes below.

    You could also check your code with this article: https://msdn.microsoft.com/en-us/library/azure/dd135734.aspx

    In addition, fiddler (http://www.telerik.com/fiddler) is a good tool to debug this type issue.

    Best Regards,

    Jambor


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Tuesday, February 3, 2015 2:40 AM
  • This is what I am getting for below code - 

    const string _bloburi = @"https://XXXX.blob.core.windows.net/";
            const string _accountname = "YYYYY";
            const string _key = "XXXXXXXXXX==";
            const string _method = "GET";
           
            static void Main(string[] args)
            {
                string AccountName = _accountname;
                string AccountSharedKey = _key;
                string Address = _bloburi;
                string MessageSignature = "";
                Console.WriteLine("vsdeploy/azurelogs");
                // Get the container name
                string container = "uploadfile";
                // Set request URI
                string QueryString = "?restype=container&comp=list";
                Uri requesturi = new Uri(Address + "/" + container + QueryString);

    vsdeploy/azurelogs
    An error occured. Status code:BadRequest
    Error information:
    <?xml version="1.0" encoding="utf-8"?><Error><Code>InvalidUri</Code><Message>The requested URI does not represent any resource on the server.
    RequestId:89738c18-0001-0017-6415-df2a33000000
    Time:2015-02-03T08:32:02.2117500Z</Message><UriPath>https://XXXX.blob.core.windows.net//uploadfile?restype=container&amp;comp=list</UriPath></Error>

    Any suggestion? 

    Tuesday, February 3, 2015 8:34 AM
  • Hi,

    From the error message, it seems that there is something wrong with the UriPath, https://XXXX.blob.core.windows.net//uploadfile?

    Please modify this code: const string _bloburi = @"https://XXXX.blob.core.windows.net/";

    remove the last ‘/’, the finial code is:

    const string _bloburi = @https://XXXX.blob.core.windows.net;Best Regards,

    Jambor


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, February 3, 2015 8:38 AM
  • whats uploadfile? 
    Tuesday, February 3, 2015 8:48 AM
  • Hi,

    Sorry for my mistake, uploadfile is my container name, you could find yours at azure portal, such as screenshot below.

    Best Regards,

    Jambor


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, February 3, 2015 8:51 AM
  • Hi Jambor -

    Do I need to change properties of container?private/public blob/public container

    Tuesday, February 3, 2015 9:23 AM
  • Hi,

    No, this rest API can list all type container.

    Best Regards,

    Jambor 


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, February 3, 2015 9:32 AM
  • I am still getting error. 

    const string _bloburi = @"https://XXXXXX.blob.core.windows.net";
            const string _accountname = "XXXXXX";
            const string _key = "YYYYYY";
            const string _method = "GET";
           
            static void Main(string[] args)
            {
                string AccountName = _accountname;
                string AccountSharedKey = _key;
                string Address = _bloburi;
                string MessageSignature = "";
                Console.WriteLine("tutorialdata.zip");<<<<<<data into blobs
                // Get the container name
                string container = "vsdeploy";<<<<<< container name
                // Set request URI
                string QueryString = "?restype=container&comp=list";
              


    x-ms-date:Tue, 03 Feb 2015 10:24:23 GMT
    x-ms-version:2009-09-19
    /XXXX/vsdeploy
    comp:list
    restype:container'.</AuthenticationErrorDetail></Error>

    Please advise how to fix this problem.

    Tuesday, February 3, 2015 10:25 AM
  • Could someone please advise me how to fix this problem.
    Tuesday, February 3, 2015 4:24 PM
  • Hi,

    It seems we back to the first question, what does the fiddler log? Do your key and account are correct? What is the detailed request url?

    Best Regards,

    Jambor 


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Wednesday, February 4, 2015 5:45 AM
  • HiSatish Dange,

    Do you solve the problem, if not, please feel free let me know.

    Best Regards,

    Jambor


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, February 9, 2015 7:06 AM
  • Hi Satish - I've tested the code and I'm not running into any errors. I only get the AuthenticationErrorDetail error when I provide an invalid account key. As Jambor has mentioned already, please verify the account key you're using is valid for that Storage account. Thanks.
    Thursday, March 5, 2015 11:22 PM