Tuesday 22 September 2015

Login failed for user iis apppool default apppool System.Data.Sqlclient.Sqlexception

Introduction

I am here highlighting the issue System.Data.Sqlclient.Sqlexception:Login failed for user iis apppool \default apppool commonly encountering while working with ASP.Net application with IIS. I have been working on web application. Everything was going fine but 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

Below I have provided steps to resolve this issue.

Step 1: Go to Run (Win+R Shortcut) and then type “inetmgr” and hit “OK” button.
Step 2: Now you are in the IIS and now expand left pane and click on the “Application Pools
Login failed for user iis apppool
IIS (Application Pool)


Step 3: Now you can select “DefaultAppPool” and click on “Advance Settings”.

Step 4: Now open “Advance Settings” window and scroll down window to “Process Model”. Under the “Process Model” section select “Identity” property. Select “LocalSystem” from drop down list. "Local Service" works the computer on local system & over the local computer.

Application Pool Identity
Application Pool Identity
Step 5: Process Model Element was introduced with IIS 7.0 
Step 6: "ApplicationPoolIdentity" runs under dynamically created application pools. identity account. "ApplicationPoolIdentity" pool access the resources from "IIS AppPool\<AppPool>", It has the great feature to administrator who can impose security privileges to end users. This is run mostly for remotely or public accessing the website.

ApplicationPoolIdentity
ApplicationPoolIdentity

Step 7: Now Click on "OK" button, you have to take optional Step 4 or step 6 to run your application smoothly.

OK

Summary

Given above steps will provide you complete helpline, how to resolve the error of “Login failed for user 'IIS APPPOOL\DefaultAppPool’”. I hope it will work to resolve your problem perfectly.

No comments:

Post a Comment