Steps to reproduce:
In VS2012, create a new ASP.NET MVC 4 Application.
Change the connectionstring in web-config to point to an Azure SQL DB.
Set [Authorize(Roles = "Admin")] on the About Method in the Home Controller for instance.
Make sure you have a user in the admin group.
Log on to the site point to About.
Wait for a while and do a refresh. You'll get an error saying:
Server Error in '/' Application.
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
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.SQLExpress database file auto-creation error:
The connection string specifies a local Sql Server Express instance using a database location within the application's App_Data directory. The provider attempted to automatically create the application services database because the provider determined that the database does not exist. The following configuration requirements are necessary to successfully check for existence of the application services database and automatically create the application services database:
It does'nt matter if I run it in VS2012 or on the site https://lstest.azurewebsites.net/Home/About
The error only occurs when the user times out. Otherwise it works fine.
Please advice.
Best Regards
Tomas
Tomas Ekenman www.luxuryspa.se