SQL Server 登录错误:用户“NT AUTHORITYSYSTEM"登录失败 [英] SQL Server Login error: Login failed for user 'NT AUTHORITYSYSTEM'

查看:81
本文介绍了SQL Server 登录错误:用户“NT AUTHORITYSYSTEM"登录失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个名为schoolPool"的应用程序池并将其分配给我的 Web 应用程序.此池的标识已设置为 LocalSystem.当我尝试从应用程序中访问我的数据库时,即打开 SQL 连接,我总是收到以下错误:

I have created an application pool called "schoolPool" and assigned it to my web application. Identity for this pool has been set to LocalSystem. When I try to access my database from within the application, i.e. open a SQL connection, I get the following error all the time:

Login failed for user 'NT AUTHORITYSYSTEM'


我尝试将 NT AUTHORITY/SYSTEM 添加到 SSMS(SQL Server Management Studio)登录名,但它已经是主体,显示以下错误:


I tried to add NT AUTHORITY/SYSTEM to SSMS (SQL Server Management Studio) logins, but it was already a principal, showing the following error:

推荐答案

我对应用程序设置进行了大量调整,将应用程序池的标识(在 Windows 8.1 的 IIS 中)更改为 LocalSystem、LocalService、NetworkService 和 ApplicationPoolIdentity.然而,他们都未能解决我登录数据库的问题.
最后 我在 LocalSystem 上设置了池标识,并思考为什么它可能会阻止NT AUTHRITYSYSTEM"打开与我的数据库的连接.我以管理员"身份打开 SQL Server Management Studio,并在登录"部分下检查了 NT AUTHORITYSYSTEM 的服务器角色.默认情况下,此用户的默认服务器角色是 public.我还检查了 sysadmin 并刷新了我的 Web 应用程序表单.这次成功了!现在一切正常.

I tweaked the application settings a lot, changing the application pool's identity (in Windows 8.1's IIS) to LocalSystem, LocalService, NetworkService, and ApplicationPoolIdentity. However, all of them failed to solve the problem I had logging into my database.
Finally I set the pool identity on LocalSystem and thought why it might be preventing "NT AUTHRITYSYSTEM" from opening a connection to my database. I opened up SQL Server Management Studio as "Administrator" and checked the Server Roles for NT AUTHORITYSYSTEM under "logins" section. The default server role for this user was public by default. I also checked sysadmin and refreshed my web application form. This time it worked! Everything working perfectly now.

这篇关于SQL Server 登录错误:用户“NT AUTHORITYSYSTEM"登录失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆