Questions:
Today, when you copy a. NET MVC project to another computer, The following exception message appears when you redeploy:
An exception of type "System.Data.Entity.Core.EntityCommandExecutionException" occurs in EntityFramework.SqlServer.dll " The underlying provider failed on Open "
Problem Finder
1. See if the string connecting the SQL Server database is correct in the Webconfig file
2. SQL settings allow selection of connections
After finding the problem is as follows:
No. 2 workaround
All Programs-->sqlserver2008-->sqlserver Configuration Manager, see the following interface, if TCP/IIP is not enabled, set enable
Then open the database and see the following permissions
If this does not solve the problem, use the following method:
Control Panel--Uninstall programs--Uninstall red labeled programs
Solve the problem smoothly after uninstalling ^_^
Reference Podcast: https://www.cnblogs.com/daomul/p/3728321.html
. NET MVC Project Error "Basic provider failed on Open"