2

So i have a localdb set up for my project in Visual Studio but when I publish it to my Azure web app, I get "

An unhandled exception occurred while processing the request. Win32Exception: The system canot find the file specified TryGetConnection"

I tried adding a "DefaultConnection" Connection String with the database/server as the value in the Web App settings but that didn't do anything

user3636407
  • 103
  • 1
  • 10

1 Answers1

3

LocalDb doesn't exist for Azure. LocalDb is a feature of SQL Server Express, there is no equivalency of that on the service (machine) you are deploying your App Service website on.

There are plenty of options instead of LocalDb when you go to Azure. The easiest (and recommended) is to use an Azure SQL database and replace your connectionstring with one that points to that instead when you publish your website.

Some other options are discussed here Using a LocalDb MDF file on Azure

Community
  • 1
  • 1
yoape
  • 3,285
  • 1
  • 14
  • 27
  • The only reason LocalDb is not supported is because MS are greedy! What is the minimal price for the (only real option) SQL Azure? – d.popov Feb 10 '21 at 07:25