Answered by:
Login fail for user "IIS APPPOOL\DefaultAppPool'

Question
-
User-830563764 posted
I have a SQL Server Database coded as the SQLDataSource control in my VS2010 ASP.NET website.
Exactly what does the error message mean? What do I need to do in IIS Web server manager to
solve the problem?TIA,
JeffreyThursday, March 31, 2016 8:10 PM
Answers
-
User-821857111 posted
The Windows account that your web site runs under is "IIS APPPOOL\DefaultAppPool". Your database connection string uses Windows authentication (Trusted_Connection=true or Integrated Security=true), so your application tries to connect to the database using the Windows user account that it runs under. However, you have not configured the account as a login for the database. So you don't actually need to do anything in IIS, but you do need to add IIS AppPool\DefaultAppPool as a login to SQL server. You can do that via SQL SErver Management Studio.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Friday, April 1, 2016 8:23 AM
All replies
-
User-718146471 posted
Chances are you are connecting to a SQL Server that is not using SQL Server Mixed authentication, it may be windows authentication required. In that case, you will need to configure the App Pool identity to use the domain credentials that were provided by your domain administrator. If this is your personal machine, you will need to change the SQL Server to use Mixed Mode Authentication. Use the Google searches to get the answers on how these things are done; if you get stuck, just post and we will help you.
Thursday, March 31, 2016 9:02 PM -
User614698185 posted
Hi Jeffrey,
Based on your error, you could take the following steps to fix it:
1.In Internet Information Services, right click the website that tries to connect to the database->choose Manage Web Site -> Advanced Settings. Take a look at the Application Pool used, in this case DefaultAppPool.
2.Now that you know the application pool the website uses, instead right click Application Pools (in IIS root) -> right click the correct application pool -> choose Advanced Settings.
3.Under Advanced Settings, find Identity and choose LocalService as the Built-in account (or LocalSystem if that's the option you've got).
For more information, please see:
http://www.technologycrowds.com/2013/03/login-failed-for-user-iis.html
Best Regards,
Candice Zhou
Friday, April 1, 2016 7:21 AM -
User-821857111 posted
The Windows account that your web site runs under is "IIS APPPOOL\DefaultAppPool". Your database connection string uses Windows authentication (Trusted_Connection=true or Integrated Security=true), so your application tries to connect to the database using the Windows user account that it runs under. However, you have not configured the account as a login for the database. So you don't actually need to do anything in IIS, but you do need to add IIS AppPool\DefaultAppPool as a login to SQL server. You can do that via SQL SErver Management Studio.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Friday, April 1, 2016 8:23 AM