I'm getting the following error once I move the app off onto its own Windows 2012 R2 IIS web server that is on Prem. The SQL 2014 DB server is in Azure. Firewall is disabled.
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)
Further:
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.
My connection strings DO NOT specify any local SQL Express DB:
<connectionStrings>
<remove name ="NewUserToolContext"/>
<remove name ="DefaultConnection"/>
<add name="NewUserToolContext" connectionString="Data Source=SQLDBSERVERNAME;Initial Catalog=NewUserTool;Integrated Security=False;User Id = USERID;password = PASSWORD" providerName="System.Data.SqlClient" />
<add name="DefaultConnection" connectionString="Data Source=SQLDBSERVERNAME;Initial Catalog=NewUserTool;Integrated Security=False;User Id = USERID;password = PASSWORD" providerName="System.Data.SqlClient" />
</connectionStrings>
My partial _Layout view has some code that checks role membership before displaying specific menu items. After doing a lot of searches on this I found old posts from 2012 and one post from way back in 2013 regarding some kind of membership initializer. The post was incredibly vague and confusing and didn't seem relevant. It also didn't explain anything about what to do, especially not for MVC 6 Entity Framework in 2017. I tried, I couldn't find anything they were talking about. I started learning ASP.NET last year with MVC 6.