I have a sample .NET web-app project using an SQL db and an Azure blob for storage. I want to have several versions of the same project (copy, paste, and renanme the folder -> and then open in VS2013), but the problem is each project copy points to the same database and Azure blob. This has created problems when running new modified copies of the same project.
Searching the web, I found that entityframework code-first will create a new database for my project: simply go to the Web.config file -> connection string -> and renaming the 'Initial Catalog' property. The old .mfd file remains, but a new one is created following the new name given.
I am assuming that something similar is possible with Azure blob containers? How can I do this? I have tried to rename the CloudBlobContainer object instance (within the class code), but this only creates errors when running.
Also, why is the CloudBlobContainer object assigned a name in the code, say imagesBlobContainer, but when i look it up under VS2013 -> Server Explorer -> Azure -> Storage -> Development -> Blobs -> here it appears as 'images'? Shouldn't it not have the same name?
Just like your SQL DB connection string, connection string for storage account is picked from the config file. If you are doing development, you should see some setting value of which would be something like UseDevelopmentStorage=true
. This tells the application to connect to storage emulator.
Now coming on to your question about connecting to different storage accounts, a few things you need to understand: