0

I have built a MVC-5 application in Visual Studio Express for Web 2013. I am using localdb which contains a few tables. I am using code first migrations and I have set up a seed method. When I run the application locally it runs perfectly but my problem occurs when I try to deploy the application to Windows Azure.

I have set up an account at Windows Azure and created a free 20MB SQL database. The application appears to deploy without any problems but when I try to use the application "An error occurred while processing your request" is displayed on the screen.

Some pages work fine but the error seems to appear on any page that interacts with database data. In Visual Studio the SQL database doesn't show in Server Explorer. I don't understand what is causing the error.

Paulie22
  • 111
  • 1
  • 1
  • 9
  • `LocalDB` is a developer-friendly version of SQL Server 2012 **Express**. Is your hosting on Azure also providing **SQL Server 2012 Express**?? Both the version (2012) and the edition (**Express**) are important – marc_s May 10 '14 at 11:21

2 Answers2

0

Enable the app to show you the full error message. Given the question this is the best answer that I can give.

You probably need some error reporting mechanism so that you find out about production bugs. Let the app send you errors by mail. Investigate ELMAH.

usr
  • 168,620
  • 35
  • 240
  • 369
0

Double check the 'Databases' section of the 'Settings' tab on the Publish Web dialog. Make sure you have 'Execute Code First Migrations' checked.

Mikee
  • 1,571
  • 2
  • 14
  • 24
  • in my case this check is greyed. (i have a default mvc template which does login but once published in azure it fails) – v.oddou Mar 20 '17 at 13:18