Skip to main content

“Value does not fall within the expected range” issue (Solved)

IIS applications run on application pools. Application pools receive requests and process them based on the settings defined. One of the settings is application pool identity. This is the account that runs application pool and perform required tasks. You may come across to this error message while trying to set a custom account as application pool identity: “Value does not fall within the expected range.

This error occurs only if you are specifying a custom account and not using any predefined accounts such as ApplicationPoolIdentity or NetworkService.

The exact error message:

The Most Functional and Compact Toiletry Bag

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

"Value does not fall within the expected range" issue

Solution for “Value does not fall within the expected range” issue

The username and password fields of the custom application pool identity window in IIS Manager has only basic validations such as empty field check, password match check, local user check (no check for domain users). Therefore, “Value does not fall within the expected range” issue is not always a good clue to lead to the solution.

It is likely that there is something simple but easy to miss (a formatting issue in the config files etc.) is causing this issue. I would recommend taking the actions below first:

  1. Check the application pool identities in the applicationHost.config file (C:\Windows\System32\inetsrv\Config) for any syntax issues
  2. Try to obtain a clean copy of applicationHost.config and replace it with the current one
  3. Restart Windows Process Activation Service (Reference)
  4. Close and reopen IIS Manager
net stop was /y
net start w3svc

If this doesn’t work:

  • Create a new application pool and try set its application pool identity
  • Try to open IIS Manager as a local or domain administrator if you are not already
  • Check Event Viewer for more details of the error message

If you see Event ID 5021, 5057 or 5059, check out this post for possible solutions: HTTP 503 Service Unavailable (Application pool has been disabled)

The Most Functional and Compact Toiletry Bag

Leave a Reply

Your email address will not be published. Required fields are marked *