问题描述:An unhandled exception occurred while processing the request.
Win32Exception: 不知道这样的主机。 Unknown location SqlException: 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: TCP Provider, error: 0 - 不知道这样的主机。) Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, uint waitForMultipleObjectsTimeout, bool allowCreate, bool onlyOneCheckConnection, DbConnectionOptions userOptions, out DbConnectionInternal connection)
出现问题描述:在调试项目过程中,SQL 的连接突然就断掉了。然后重新连接怎么都链接不上,使用 Microsoft SQL Server Management Studio 是可以连接上的。所以电脑后台的有一个进程是一直链接到 SQL 的。所以重启电脑即可!!!
解决方法就是:重启电脑