Robert Pallin
Robert Pallin

Reputation: 139

Deploying MVC4 Website to Windows Azure

Just a quick question. I deployed a website to Azure and it works fine. I'm just wondering do I have to change the account model to enable accounts be used from the azure sql database? I can register and login on the deployed website, but the details arent going into a table it's using the default method that is generated for an MVC4 website application.

Thanks in advance.

Upvotes: 1

Views: 244

Answers (1)

viperguynaz
viperguynaz

Reputation: 12174

Yes - you need to use an External DB (Azure SQL or another SQL instance). You cannot use a SQL Express user instance stored under App_Data for this. When you launch the project in the development fabric, the app is really running from a copy in the bin\Debug[YourProjectName].csx folder of the cloud project, and the database that the application modifies will also be a copy in that folder. Every time you restart the application in the development fabric, the changes to the database are overwritten by the copy in your project's folder.

If you are going to test the cloud project locally using SQL Express, you are better off using a database that is not running in user instance mode.

Upvotes: 2

Related Questions