Blazor MS SQL 服务器:用户登录失败/管道错误结束时没有进程

Blazor MS SQL Server: Login failed for user/ No process at end of pipeline error

我正在尝试将我的 Blazor 项目连接到带有 IIS 的 MS SQL 服务器,但我不断收到两个错误。

我最初尝试连接时遇到的第一个错误如下:

Error: System.Data.SqlClient.SqlException (0x80131904): A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.) ---> System.ComponentModel.Win32Exception (233): No process is on the other end of the pipe.

我重新加载页面时出现的第二个错误如下:

Error: System.Data.SqlClient.SqlException (0x80131904): Login failed for user 'User1'.

从我收集到的信息看来,服务器上似乎存在某种权限问题,但我无法确定需要更改的位置或内容。这些是我尝试过的一些常见问题。

服务器身份验证:SQL 服务器和 Windows 身份验证模式。

允许远程连接:true。

用户 1:似乎对所有东西都有 access/permission。

我还检查了 SQL 日志,发现错误是:

Login failed for user 'User1'.Reason: Could not find a login matching the name provided.[CLIENT: ] Error: 18456, Severity: 14, State:5

如有任何帮助,我们将不胜感激。

启用TCP\IP协议,然后再次测试。

接下来的步骤:

  1. 关闭防火墙和防病毒软件。
  2. 在服务器端和客户端启用TCP\IP协议并使用1433端口。
  3. 重新启动 SQL 服务并重试。

更详细的步骤:setting-up-management-studio-for-remote-sql-server

更多有用信息:how-to-connect-to-a-remote-sql-server