Allow only one user in ASP.NET using web.config
Put the domain in the code below and the user name that you want to give the permission to. This works fine for me. You can add multiple user if you want to by adding the allow tag multiple times.
<authentication mode="Windows" />
<allow users="domainname\username" />
<deny users="*" />