Azure SQL database working when ran locally but not when published to Azure

Zeroshade

New Member
This has been cracking me up for a few days now and I just can't solve it.I followed an online tutorial showing you how to connect and use an Azure database using the model first approach within \[code\]entity framework\[/code\]. With this you had to set up database migrations as to update the azure database when publishing the website to azure.I had already created a database on azure so i thought i would take the approach of using a database first model (also it didnt require migrations to be setup) and used the entity framework wizard to create my model. Everything worked perfectly and when I run my \[code\]MVC\[/code\] website locally it connects to my azure database and shows the data etc. However when I publish the website to azure websites for some reason when I click on tab that uses the controller that gets data from the database I get a \[code\]Sorry, an error occurred while processing your request.\[/code\] Error.I have checked my connection strings and they all seem ok and as I said when I run it locally I can get the data from the azure database but for some reason I can't once its published.Any ideas?
 
Back
Top