High CPU usage in IIS around 4am everyday

I have recently worked with a server that was struggling with high CPU usage only at a certain time of the day: 4am. It sounds odd first but it made sense later. I will discuss the scenario and possible solutions in this post.

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