IntroductionI am here highlighting the difficulty System.Data.Sqlclient.Sqlexception:Login failed for user iis apppool \default apppool usually encountering whereas working with ASP.Net application with IIS. I actually have been engaged on web application. Everything was going fine however suddenly I got the error “System.Data.SqlClient.SqlException was unhandled by user code: Login failed for user 'IIS APPPOOL\DefaultAppPool’” and database connection couldn't open.
Error Description:System.Data.SqlClient.SqlException was unhandled by user code: Login failed for user 'IIS APPPOOL\DefaultAppPool
Know How About Application Pool IdentityApplication Pool Identity corresponds to security of your website whereas running your website under IIS. Application Pool Identity runs your website unique account. Network service is IIS default identity, it doesn't need password so caused low prevailed. You'll reconfigure IIS Application Pool Identities as per your specific demand.
I have below provided steps to resolve this issue.
Step 3: Now you can select “DefaultAppPool” and click on “Advance Settings”.
|Application Pool Identity|
Step 6: "ApplicationPoolIdentity" runs under dynamically created application pools. identity account. "ApplicationPoolIdentity" pool access the resources from IIS AppPool\<AppPool>, It's nice feature to administrator who will impose security privileges to end users. This is often run mostly for remotely or public accessing the website.
Step 7: Now Click on "OK" button, you have to take optional Step 4 or step 6 to run your application smoothly.
By Command line, we can also provide complete access to DefaultAppPool (if Already complete access to production server)
ICACLS test.txt /grant "IIS AppPool\DefaultAppPool":F
SummaryGiven above steps will provide you complete helpline, the way to resolve the error of “Login failed for user 'IIS APPPOOL\DefaultAppPool’”. Application pool identity need default permission to run your website under IIS perfectly for specific account access group. I hope steps provided above will work to resolve your problem perfectly.
- HTTP Error 403.14 - Forbidden in IIS
- Could not open a connection to SQL Server
- Jquery Timer Countdown in MVC Application