none
No valid combination of account information found.

    Question

  • Hi,

    Already searched the web but still having the problem: No valid combination of account information found. when running my Console App.

    App.config

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
        <startup> 
            <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
        </startup>
      <appSettings>
        <add key="StorageConnectionString" value="DefaultEndPointsProtocol=http;AccountName=xyz;AccountKey=/yyyaRQYTN56gGwWCzSkVO9ysA7qMHYVSxL+d8inJv9Rq43Fx8ClIuDNlOHhK53xIcG4hJCT9jVP+x/D2LAVjQ==" />
      </appSettings>
    </configuration>

    Statement causing the error:

     CloudStorageAccount storageAccount = CloudStorageAccount.Parse(ConfigurationManager.AppSettings["StorageConnectionString"]);

    I'm following exact as in:

    https://www.microsoftpressstore.com/articles/article.aspx?p=2315377

    and

    http://azure.microsoft.com/en-us/documentation/articles/storage-dotnet-how-to-use-queues/

    Tried this and worked:

    var storageAccount = CloudStorageAccount.Parse("DefaultEndpointsProtocol=http;AccountName=xyz;AccountKey=/yyyRQYTN56gGwWCzSkVO9ysA7qMHYVSxL+d8inJv9Rq43Fx8ClIuDNlOHhK53xIcG4hJCT9jVP+x/D2LAVjQ==");

    Obviously something is wrong in App.config or reading App.config. However, I copied exactly the same string from App.config and pasted it in the code snippet above!

    What can be wrong with app.config?

    Thanks.




    • Edited by Guy Dillen Wednesday, April 29, 2015 8:24 PM
    Wednesday, April 29, 2015 10:15 AM

Answers

All replies

  • Hi Guy,

    Please do not add any PII information when posting a query on a public forum.
    You can instead replace them with ***.

    Have you tried re-entering the credentials by using the GUI instead of editing the configuration files directly?
    Sometimes the version of the SDK is case sensitive, please make sure you have written "true" in lower case and used correct casing for "UseDevelopmentStorage".

    Regards,
    Malar.

    Thursday, April 30, 2015 10:51 AM
  • Hi Malar,

    Please do not add any PII information when posting a query on a public forum.
    You can instead replace them with ***.

    If you mean the Account Name and Account Key: these are not the real name & key. (Instead of using *** I used xyz and yyy).

    Have you tried re-entering the credentials by using the GUI instead of editing the configuration files directly? 

    No I haven't. But the strange is when entering the key directly in the program everything works, when reading the key from App.config it gives the  error. Anyway I'll try by using the GUI.

    Sometimes the version of the SDK is case sensitive, please make sure you have written "true" in lower case and used correct casing for "UseDevelopmentStorage".

    I didn''t use "UseDevelopmentStorage". Do I need this?

    Thanks.
    Guy


    • Edited by Guy Dillen Thursday, April 30, 2015 2:35 PM
    Thursday, April 30, 2015 2:35 PM
  • Same problem when using the GUI to create a settings file.

    The only thing that works is hard-coding the string in the program (of course I don't want that):

    var storageAccount = CloudStorageAccount.Parse(***);

    Regards,
    Guy

    Friday, May 1, 2015 11:01 AM
  • Find & solved the problem: 1 different character in the connectionstring.

    • Marked as answer by Guy Dillen Friday, May 1, 2015 1:00 PM
    Friday, May 1, 2015 1:00 PM