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
The exact error message:
There was an error while performing this operation. Details: Value does not fall within the expected range.
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:
- Check the application pool identities in the
C:\Windows\System32\inetsrv\Config) for any syntax issues
- Try to obtain a clean copy of
applicationHost.configand replace it with the current one
- Restart Windows Process Activation Service (Reference)
- 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)
2 thoughts on ““Value does not fall within the expected range” issue (Solved)”
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.
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” /]