且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

"用户登录失败''"尝试使用Windows身份验证时

更新时间:2022-06-15 19:54:24

有关您的连接字符串从ASP.NET应用程序的工作,你的请求必须在可以访问SQL Server的用户身份运行。默认情况下,它会使用应用程序池的工作进程的身份和普遍,这个身份是本地用户(在服务器上)不具有访问SQL Server。所以,你可以尝试改变这个身份,看看是否能帮助。

For your connection string to work from ASP.NET application, your request must be running under user identity that can access SQL Server. By default, it will use identity of app pool worker process and generally, this identity is a local user (on the server) that does not have access to SQL Server. So you may try changing this identity to see if that help.

如果你想使用正在访问你的ASP.NET站点,那么你已经转集成的IIS和AS​​P.NET两种身份验证的Windows用户的身份。您还需要打开 ASP.NET模拟使ASP.NET请求将执行用户的身份。

If you want to use identity of the windows user that is accessing your ASP.NET site then you have turn integrated authentication on in both IIS and ASP.NET. You also need to turn on the ASP.NET impersonation so that ASP.NET request will execute on the user's identity.

如果您仍遇到问题,那么你可能会面临双跃点问题涉及到Windows身份验证(请参阅文章以获得更多信息和故障排除在看见两个链接)。

If you are still facing the issue then you might be facing double hop issue related to windows authentication (see two links sighted in the article for more info and trouble shooting).