Deploy ASP .NET MVC application using LocalDB to local IIS

|

When ASP application is published to IIS using LocalDB accessing the database may result in the following error:
Server Error in '/Application_Name' Application.A network-related or instance-specific error occurred while establishing a connection to SQL Server.