SqlException: Login failed for user 'NT AUTHORITY\NETWORK SERVICE

前端 未结 7 2206
无人及你
无人及你 2021-02-08 12:42


When I run web application via VS 2008, the application is able to log onto Sql server and check credentials ( user name and password ) entered by the user, but whe

7条回答
  •  春和景丽
    2021-02-08 13:23

    As you specify "integrated security=sspi" in connection string than I guess you expect impersonating. But for this you should: 1. turn on integrated auth in IIS 2. turn on windows auth in asp.net: 3. turn on imerposation in asp.net:

    Also consider that it's not enough if you web server and SQL Server machine are different machines. Then your users' account will be required to be trusted for delegation. It's special option in AD.

    So, you have been said already it's better to have separated account for SQLSRV connections. Hope this helps.

提交回复
热议问题