You don’t have permission to view this directory or page.
Dot net applications and IIS server are completely unpredictable. Same error can be solved by multiple methods and multiple methods can fail to solve only a single issue. 403 is a pretty straight forward error to solve and the main area to look is the permissions of different directories like resources, temp, etc.. 403.501 is another error which can misguide at the initial stage that its due to permission as you will always get error message “You don’t have permission to view this directory or page.” but actually its not just permission error. You need to go to IIS error and check the inner logs and get the nested error code which is 501 under 403 error block.
Method of solve this issue
First you need to find the error code from IIS errors under IIS Log directory (InetPub).
Go to Microsoft website for IIS to check the definition of this error code.
403.501 – Forbidden: Too many requests from the same client IP; Dynamic IP Restriction Concurrent request rate limit reached.
When this happen all of the clients start getting the same error message even there is only IP address which is sending more than allowed connection requests.
Reason
The main reason of this dynamic IP address restriction is the default settings which is 50 concurrent connections setting on IIS manager Dynamic IP restriction settings screen.
Why this happened with me was the internal penetration testing of my application.
Solution!!
Go to IIS Manager
Under IIS sections, go to IP Address and Domain Restrictions
Under actions pane go to Edit Dynamic Restriction Settings, change the settings according to your need or disable completely.
This will solve the error 403.501. Increasing the number of concurrent connections will solve this issue as well.
Please fell free to leave a comment.