用户"SystemName \ IUSR_SystemName"的登录失败.在SQL Server中? [英] Login failed for user 'SystemName\IUSR_SystemName'. in sql server?

查看:79
本文介绍了用户"SystemName \ IUSR_SystemName"的登录失败.在SQL Server中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尊敬的先生,

用户"SystemName \ IUSR_SystemName"的登录失败.在sql server中?
我该怎么办?

因为我的asp.net页中发生了错误
用户"SystemName \ IUSR_SystemName"的登录失败."

如何解决这个问题?


注意:我更新了数据库备份相同的系统.



通过mohan.

解决方案

如果您最近恢复了备份(如果我正确理解了您的问题),则可能是您的用户不存在(不是"'不是在备份中),或者如果该用户已存在并已通过SQL Server身份验证,则您可能具有旧密码(进行备份时有效的密码).


是吗?在连接字符串中使用Windows身份验证?

如果是这样,则在部署到Web服务器时,当它尝试连接到SQL实例时,它将使用ASP.Net进程在
下运行的帐户.
要么...

1)授予对您服务器\数据库中帐户的访问权限

2)将应用程序配置为在其他Windows帐户下运行.例如.使用具有已配置标识的应用程序池并设置您的Web应用程序以在该应用程序池中运行

3)更改连接字符串以使用SQL Server安全性.创建一个SQL用户+密码,授予对数据库的访问权限,并相应地更改您的连接字符串.


选项3)相当普遍且易于实现.


尝试以下链接;
sp_change_users_login
数据库还原后,用户登录失败

Dear sir,

Login failed for user ''SystemName\IUSR_SystemName''. in sql server?
what can i do?

because error occur in my asp.net page
"Login failed for user ''SystemName\IUSR_SystemName''."

how to solve this problem?


Note: I Updated my database backup same system.



By mohan.

解决方案

If you have recently restored a backup (if I understood your question correctly) then the problem may be that you have an nonexisting user (it wasn''t in the backup) or if the user is existing and authenticated by SQL Server, then you may have old password (the one that was valid when the backup was made).


Are you using Windows Authentication in your connection string?

If so, when you deploy to a web server, when it attempts to connect to the SQL instance, it will use the account that the ASP.Net process is running under

Either...

1) Grant access to the account in your server \ databases

2) Configure the application to run under a different windows account. E.g. use an application pool with a configured identity & set your web application to run in that application pool

3) Change the connection string to use SQL Server security. Create an SQL user + password, grant access to the database and change your connection string accordingly.


Option 3) is fairly common & easy to implement.


try the following link;
sp_change_users_login
Get Login failed for user after a database restore


这篇关于用户"SystemName \ IUSR_SystemName"的登录失败.在SQL Server中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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