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

“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:

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)

Ned Sahin

Blogger for 20 years. Former Microsoft Engineer. Author of six books. I love creating helpful content and sharing with the world. Reach me out for any questions or feedback.
Categories IIS

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

  1. saved me with this note. thanks.

    We add / remove apps under a website in IIS via command files. I think I fumble fingered one of those today and ended up with

    in the applicationHost.config file. Checking the Event Viewer made it immediately obvious.

  2. well, entering xml didn’t work there…missing above is the 3 lines from the .config file. using [ brackets ]…

    [application path=”/D:\sites\admin\7za” applicationPool=”xyz”]
    [virtualDirectory path=”/” physicalPath=”D:\sites\xyz\D:\sites\admin\7za” /]


Leave a Comment