Password Protect Azure Website with Basic Authentication in 5 minutes
Hi friends, If you are working with azure server and you have development or staging servers. So you may be want to protect them with a simple password so no one from the outside can access it and also it won’t allow google to index your website.
So first of all you have to install the HttpAuthModule library from the nudget. Just go to your project and add this package in your project. Once it’s done you can go to your web.config file and you will find the code at the very end of your web.config like below :-
I have used the credentials in web.config like user1:pass1,user2:pass2.
You can edit these credentials as per your requirements. Once it’s done will show the login page first time at your website like below image.
Hope you will be able to complete this in 5 minutes.