string - Access Azure Storage Configuration Setting from class library -
i have azure project uses azure storage. connection string azure storage saved in configuration settings azure project.
now have created class library. want able load connection string in class library. best way of doing this?
for example, put connection string in app.config class library? if so, azure project override automatically when run solution?
you may looking microsoft.windowsazure.cloudconfigurationmanager
. getsetting
method attempts pull setting cloud configuration, if role isn't available (for instance because you're in unit test), reads <appsettings>
element inside app.config or web.config file.
here's basic syntax:
using microsoft.windowsazure; ... var settingvalue = cloudconfigurationmanager.getsetting("settingkey");
msdn[1] says syntax deprecated release of storage 3.0, class , method aren't attributed such, documentation may have bit of copy pasta in it.
Comments
Post a Comment