Step -1: Go to IIS Manager application, access your website and select the directory that you want to protect.
Step -2: On the right part of the screen, access the option named: Authorization rules.
Step -3: Remove any existing rule.
Step -4: Add a new authorization rule for the directory.
Step -5: To allow access only to a specific user, perform the following configuration:
• Specified user – Yes.
• Enter the name of the user.
Click on the OK button.