Is there an easy way to password protect my website during development so that only m开发者_如何转开发y tester can hit it? It's an ASP.NET site and is hosted on discountasp.net.
Thanks, Jay
You can just set up a temp user/password in the C# part of your login page. That'll keep others out, and let you get in until you implement a real user system.
If they click login without that pass, no redirect to the rest of site. If they enter the correct user and pass, redirect to the rest of the site.
Require ASP.NET Forms authentication in your web.config and redirect to login page if not authenticated. This can integrate into your existing authentication database.
You need to activate Windows Authentication for the website. This will require a domain or server account credentials to be filled in before the site can be accessed otherwise the user will receive a 401.2 not authorized error.
Example at www.33bh.com. Just hit escape when the popup appears to see the 401.2 not authorised error.
精彩评论