Login failed for user 'IIS APPPOOL\ASP.NET v4.0'

后端 未结 30 4720
天命终不由人
天命终不由人 2020-11-22 15:52

I have a web project (C# Asp.Net, EF 4, MS SQL 2008 and IIS 7) and I need to migrate it to IIS 7 locally (at the moment works fine with CASSINI).

Locally in IIS I ha

30条回答
  •  被撕碎了的回忆
    2020-11-22 16:11

    I had this message and I use Windows Authentication on the web server.

    I wanted the currently authenticated web user to be authenticated against the database, rather than using the IIS APPPOOL\ASP.NET v4 User specified in the App Pool.

    I found by entering the following in the web.config fixed this for me:

    
      
    
    

    https://msdn.microsoft.com/en-us/library/bsz5788z.aspx

    I see other Answers regarding creating the AppPool username in the SQL DB or just to use SQL Auth. Both would be correct if you didn't want to capture or secure individual Windows users inside SQL.

    Tom

提交回复
热议问题