I will be using a domain windows account(maintained in Active Directory) as Application pool identity in my web server. So i want the account to be a member of IIS_W
I'm not sure about adding via Active Directory as a blanket fix.
We used this method for IIS 6:
Add User to IIS_WPG group: Go to Computer Management on the box hosting the site, Local Users and Groups > Groups, right-click IIS_WPG > Add to Group, then add the windows account, Apply, OK.
Then allow account to run as service: Admin Tools > Local Security Policy > Local Policies > User Rights Assignment > Log on as a service Properties, Add user, Apply, OK
Set App Pool Identity: IIS > App Pool Properties > Identity tab, set as configurable and input user, Apply, OK.
Then reboot box.
Good resource: Steps for setting up a custom identity of an IIS 6 application pool
Right click on your Application Pool, in Process Model section, identity (first one) go in and select the second radio button which is Custom account and enter your desire account and password
In the identity tag and use your windows domain and windows user name in the web.config file
In the IIS Server set the pool identity as ApplicationPool.
Disable anonymous authentication for the web application. Enable Impersonation and Windows Authenticaton. for the web Application in the IIS Box
On Windows Server 2012 (in my case) one have to