title: Getting Error The argument 'nameOrConnectionString' cannot be null, empty or contain only white space with Azure Database
body: <p>I am having my database and other storage on azure cloud storage.i am using Entity Code first appoach but problem is when i am trying to read connection string from cloud storage using <strong>CloudConfigurationManager.GetSetting()</strong> i am getting below error:</p>
  
  <p><strong>Error:The argument 'nameOrConnectionString' cannot be null, empty or contain only white space.
  An exception of type 'System.ArgumentException' occurred in EntityFramework.dll but was not handled in user code</strong></p>
  
  <p>This is my Azure project:Demo.Web.Azure</p>
  
  <p>It has 2 configurations file:</p>
  
  <p>1)ServiceConfiguration.Cloud.cscfg:</p>
  
  <pre><code>&lt;Role name="Demo.Web"&gt;
   &lt;Setting name="MyConnectionString"
   value="Server=----;Database=DemoEntity;User ID=---;Password=---&amp;amp;w;Trusted_Connection=False;
  Encrypt=True;MultipleActiveResultSets=True;" /&gt;
  
    &lt;Setting name="Demo.Storage"
   value="DefaultEndpointsProtocol=https;AccountName=---;AccountKey=------"
   /&gt;
  </code></pre>
  
  <p>2)ServiceConfiguration.Local.cscfg:</p>
  
  <pre><code>&lt;Role name="Demo.Worker"&gt;
    &lt;Setting name="Demo.Storage"
   value="DefaultEndpointsProtocol=https;AccountName=---;AccountKey=------"
   /&gt;
  </code></pre>
  
  <p>3)ServiceDefinition.csdef:</p>
  
  <pre><code>&lt;ServiceDefinition name="Demo.Web.Azure" schemaVersion="2014-06.2.4"&gt;
        &lt;WebRole name="RepuGuard.Web" vmsize="Small"&gt;
           &lt;ConfigurationSettings&gt;
                    &lt;Setting name="MyConnectionString" /&gt;
  
                    &lt;Setting name="Demo.Storage" /&gt;
                   &lt;/ConfigurationSettings&gt;
  
       &lt;/WebRole&gt;
  
   &lt;WorkerRole name="Demo.Worker" vmsize="Small"&gt;
                  &lt;ConfigurationSettings&gt;
                    &lt;Setting name="MyConnectionString" /&gt;
  
                    &lt;Setting name="Demo.Storage" /&gt;
                   &lt;/ConfigurationSettings&gt;
  
   &lt;/WorkerRole&gt;
  
  &lt;/ServiceDefinition&gt;
  </code></pre>
  
  <p>This is my Context file which read Database connection string:</p>
  
  <pre><code>public partial class MyDemoDBContext : DbContext, IDisposable
      {
             public ObjectContext Context { get; set; }
             public MyDemoDBContext()
              : base(CloudConfigurationManager.GetSetting("MyConnectionString"))//Getting Error here
             {
               Context = ((IObjectContextAdapter)this).ObjectContext;
             }
               public MyDemoDBContext (string connectionString)
  
              : base(connectionString)
  
               {
  
                   Context = ((IObjectContextAdapter)this).ObjectContext;
  
               }
  }
  </code></pre>
  
  <p>Getting error here:</p>
  
  <pre><code>public MyDemoDBContext()
              : base(CloudConfigurationManager.GetSetting("MyConnectionString"))
             {
               Context = ((IObjectContextAdapter)this).ObjectContext;
             }
  </code></pre>