When assigning a new identity to an AppPool, you may encounter the insufficient permissions error if the user assigned does not have the right to read from the wwwroot folder.
Issue Details
When assigning domain users the right to interact with a web server, you have to make sure they have the appropriate permission to access specific top-level folders. In this case, we are working with the wwwroot.
Assigning a domain user to an application pool (or AppPool Identity is not enough. Depending on what the web application needs to do, the required rights will vary.
In this article, we will go over how to recreate the subject error and then how to resolve it.
Recreate Issue
In IIS - Application Pools
Choose an AppPool and click on [Advance Settings]
Choose [Identity] = Click on the ellipse button beside the [ApplicationPoolIdentity][...]
Click on [Custom account] then click [Set...]
Type in the: domainname\domainuser
Type the password, then confirm it.
Click [OK], then [OK], and then [OK] to close out of the [Advance Settings] dialog box.
Go to the IIS Server you want to use to connect to this server, and choose Connect to a Server.
Right Click on the [Start Page]
Choose [Connect to a Server...]
Type in the [Server Name]
Click [Next]
Type in user name: domainname\domainuser
Then the password.
Click on [Next]
You should see the following message.
Failed to connect There was an error when trying to connect. Do you want to retype your credentials and try again? Details: Filename: MACHINE/WEBROOT Error: Cannot read configuration file due to insufficient permissions.
[Yes][No]
Resolve Issue
Make sure you assign the appropriate roles to the user inside of [Active Directory Users and Computers] on the DC (Domain Controller)
The list below is what we use in our Domain for all our users.
Copy these, and paste into the [Select Groups] dialog under: [Enter the object names to select] field