A network-related or instance-specific error occurred while establishing a connection to SQL Server
The main page loads fine, but the error occurs when I try to goto Account/Register or Account/Login.
The error occurs on this line in SimpleMembershipInitializer constructor in file Filters/InitializeSimpleMembershipAttribute.cs
if (!context.Database.Exists())
Now, if I set my web.config to
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework" />
</entityFramework>
it works locally only but I'm assuming it's using a local database. Right now my entity framework in the web.config looks like
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
I have another application where I am using the same hosting service and free database (appharbor and SQL Server Yocto) and it works just fine. I recently setup a new application and database and it doesn't work. I can connect to the database fine in SQL server and expanding the DataConnections -> MyContextName in visual studio 2012, so I know the connection string is not the problem.
I'm wondering if there is a problem on the server the database is hosted on and I don't have access to that.
I'm all out of ideas on how to fix this problem. Thanks.