I have also run into this problem in Windows Server 2012. Trying to set the App Pool identity from the command line you receive a similar error:
C:> appcmd set config /section:applicationPools
/[name='test-pool'].processModel.identityType:SpecificUser
/[name='test-pool'].processModel.userName:MyAccountName
/[name='test-pool'].processModel.password:P@ssw0rd
ERROR ( hresult:80070057, message:Failed to commit configuration changes.
The parameter is incorrect.
)
If you remove the last parameter the command will succeed changing identity type and setting the username. I did never figure out why I could not set the password so I retorted to editing my applicationHost.config file directly. Unfortunately with the the password in clear text.
<configuration>
...
<system.applicationHost>
<applicationPools>
...
<add name="test-pool" managedRuntimeVersion="v4.0">
<processModel identityType="SpecificUser"
userName="MyAccountName" password="P@ssw0rd" />
</add>
...
</applicationPools>
...
</system.applicationHost>
...
</configuration>
In addition to configuring the app pool to use a specific account I made the following:
1) Included the user in the IIS_IUSRS group that indirectly gives it Logon as Batch Job rights.
2) Run the following command to grant rights to the user
aspnet_regiis -ga <your_app_pool_user>
See more: How To: Create a Service Account for an ASP.NET 2.0 Application (MSDN)
3) Restarted WAS and IIS to make sure the changes to the accounts group membership takes hold.
C:> net stop was /y
C:> net start w3svc