ABP问题记录

按照《Asp.NET Core2.0与 EF的ABP框架入门视频教程》(https://ke.qq.com/course/287301)下载了3.9版本的ABP,开始学习,下面记录遇到的问题

使用的是VS2017社区版(版本15.7.4)

1、运行MPACore.PhoneBook.Web.Host项目,遇到错误: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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

原因:appsettings.json设置为使用本地SQL Server,但是我计算机上没有安装,默认使用localdb,需要修改
        "Default": "Server=localhost; Database=PhoneBookDb; Trusted_Connection=True;"
改为
    "Default": "Server=(LocalDB)\\MSSQLLocalDB; Database=PhoneBookDb; Trusted_Connection=True;"

猜你喜欢

转载自www.cnblogs.com/s5689412/p/9227472.html