用户“用户名"的登录失败. [英] Login failed for user 'username'.

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

问题描述

朋友们,

我创建了一个Web项目,该项目将访问.NET类库(dll)以进行与数据库相关的活动.该SQLServer位于远程位置.我们使用Windows身份验证模式与该sql服务器连接.

当我从VS 2008运行Web应用程序时,一切正常.但是在IIS 5.1中进行部署后,出现以下错误.

用户用户名"的登录失败.该用户未与受信任的SQL Server连接关联."

我通过创建日志文件来跟踪此错误.
请帮我...尽快...

提前谢谢...
问候,
Suresh

Hi friends,

I have created a web project which will access a .NET class library(dll) for database related activities. That SQLServer is located in remote location. We connect using Windows Authentication mode with that sql server.

Everything works fine when i run the web application from VS 2008. But after deploying in IIS 5.1, i am getting the following error.

"Login failed for user ''username''. The user is not associated with a trusted SQL Server connection."

I traced this error by creating a log file.
Please help me... ASAP...

Thanks in advance...
Regards,
Suresh

推荐答案

sureshbalachander写道:
sureshbalachander wrote:

我们使用Windows身份验证模式与该SQL连接服务器

We connect using Windows Authentication mode with that sql server





sureshbalachander写道:
sureshbalachander wrote:

但是在IIS 5.1中部署后,出现以下错误.

But after deploying in IIS 5.1, i am getting the following error.



部署后,用于访问DLL的用户名/密码不是您的Windows.

由于要使用Windows身份验证,请尝试在IIS中进行配置:
身份验证选项卡
-删除匿名用户复选框
-选择Windows身份验证复选框




您可以在Web.Config文件中尝试模拟".使用已知的用户名/密码. (尽管我相信这不是您要保持所有Windows身份验证的选项.)



After deployment the username/password used to access the DLL is not your windows one.

Since you want to use windows authentication, try to configure in IIS:
Authentication tab
- remove anonymous user checkbox
- select windows authentication checkbox


Or

You can try ''impersonation'' in your Web.Config file. Use a known username/password. (Though i believe this wouldn''t be your option as you want to keep all windows authenticated.)


首先,检查您的sql connect模型.
同时,您可以尝试使用usename和pwd模型.
First,check you sql connect model.
At the same time ,you can try use usename and pwd model.


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

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