I have been trying to deploy original ASP .NET Web Application using MVC template with authentication via a local SQL database file. So far, I am able to get it to work on my computer. When I publish it to a folder on a remote server, I can't seem to figure out how to configure IIS 10 to read from that local SQL database file saved to its App_Data subdirectory. I have been getting the following error as a result:
SQL Network Interfaces error 52 - Unable to locate a Local Database Runtime installation. Verify that SQL Server Express is properly installed and that the Local Database Runtime feature is enabled.
I attempt to fix the problem by installing SQL Server 2012 Express on the remote server, but the problem is still there. So I figure the problem might be coming from the connection string:
Data Source=(LocalDb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\aspnet-WebApplication1-20180923034052.mdf;Initial Catalog=aspnet-WebApplication1-20180923034052;Integrated Security=True" providerName="System.Data.SqlClient
The above is what I have on my computer. Since I configure the SQL server as default on the remote server, I figure that I should match up the name of SQL server database engine, which is MSSQLSERVER by default as shown below. It didn't work neither.
Data Source=.\MSSQLSERVER;AttachDbFilename=|DataDirectory|\aspnet-WebApplication1-20180923034052.mdf;Initial Catalog=aspnet-WebApplication1-20180923034052;Integrated Security=True" providerName="System.Data.SqlClient
What configuration am I missing to get this simple ASP .NET web application to work?