Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

It's a newly setup server in a new domain.

I added a website to IIS and created an application pool for it. As soon as I try to set a different User (Identity) to run the Application Pool I receive an error.

There was an error while performing this operation. 
Details :
Value does not fall within expected range.

The User is domain User and part of Administrator group, I also added him to IIS_IUSRS group - without success.

I tried a to use my user account and it didn't work either. Only localservice or localsystem are working, no custom users. Since the Event log is empty I run out of ideas. I deleted the website deleted apppool, recreated already many times, no success.

Windows server 2012, IIS 8

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.