System.Data.SqlClient.SqlException: Login failed for user

前端 未结 10 2361
难免孤独
难免孤独 2020-12-01 14:11

Working with my project in debug I have no issues. However running it in IIS I am getting this error:

System.Data.SqlClient.SqlException: Login failed for us

10条回答
  •  余生分开走
    2020-12-01 14:27

    Assuming you're intending to use Windows Authentication to impersonate the service account, you have to set up Windows Authentication in both IIS and ASP.NET.

    In IIS, make sure that the Windows Authentication module is added and enabled. Also make sure your application pool is running under a domain account, not a local account.

    In ASP.NET make sure the authentication mode attribute is set to "Windows"

    
        
     
    

提交回复
热议问题