No valid combination of account information found.

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
April 29th, 2015 10:15am

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.

Free Windows Admin Tool Kit Click here and download it now
April 30th, 2015 6:53am

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


April 30th, 2015 10:37am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics