我试图将ASP.NET身份添加到我的Web API 2项目。 REST服务工作正常,但每当我尝试注册(在http://localhost:3216/Account/Register)发生这种情况:ASP.NET身份不适用于web api 2
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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
有它发生:
var result = await UserManager.CreateAsync(user, model.Password);
如果您需要有关代码的进一步信息随时问,但在那一刻我不知道代码片段可以帮助你。
此致敬礼!
您是否已经打开Web服务器和数据库服务器之间的防火墙端口? – criticalfix