title: LocalDB using in Azure App service
body: <p>I have the below connection string in Web config and works fine in Visual Studio.  </p>
  
  <pre><code>&lt;connectionStrings&gt;
     &lt;add name="DefaultConnection" connectionString="Data Source=(LocalDb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\aspnet-MyPortal-20170627104450.mdf;Initial Catalog=aspnet-MyPortal-20170627104450;Integrated Security=True" providerName="System.Data.SqlClient" /&gt;
  &lt;/connectionStrings&gt;
  </code></pre>
  
  <p>I tried porting my ASP.NET MVC application to Azure using Azure App service and Azure AD. I changed AttachDbFilename attribute as below</p>
  
  <p><code>AttachDbFilename=\App_Data\aspnet-MyPortal-20170620051631.mdf</code></p>
  
  <p>I am getting below error:</p>
  
  <blockquote>
    <p>Invalid value for key 'attachdbfilename'.<br>
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. <br>
    Exception Details: System.ArgumentException: Invalid value for key 'attachdbfilename'.<br>
    Source Error: <br>
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</p>
  </blockquote>
  
  <p>App Data folder does contain the mdf file. How do I refer it in the connection string in web config? </p>
  
  <p>Is there any sample program for Azure Web app getting authenticated with Azure AD? </p>