为网站设置私人测试版 [英] Setting up a private beta for a website

查看:106
本文介绍了为网站设置私人测试版的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为我正在工作的网站设置私人Beta".该网站使用开放ID.如果他们不是Beta版的一部分,我什至不希望任何人浏览这些页面.实现此目的的最佳方法是什么?有什么建议吗?

I'm trying to setup a "private beta" for a site that I'm working on. The site uses open id. I don't want anyone to even browse the pages if they aren't part of the beta. What's the best way to implement this? Any suggestions?

例如:

该网站上线后,用户将转到 http://www.mydomain.com 不需要他们登录.

When the site goes live, users will go to http://www.mydomain.com which will not require them to log in.

对于Beta版,我想限制访问.转到 http://www.mydomain.com 的用户将被重定向到登录页面.任何尝试访问未经身份验证的网站任何部分的人都将被重定向回登录页面.

For the beta I want to restrict access. Users that go to http://www.mydomain.com will be redirected to a login page. Anyone attempting to access ANY PART OF THE SITE who is not authenticated will be redirected back to the login page.

我可以在控制器的所有动作上粘贴[Authorize]属性,但这似乎很愚蠢.

I could stick [Authorize] attributes all over my controller actions, but that seems stupid.

推荐答案

如果您使用的是ASP.NET MVC,则它具有开箱即用的身份验证/授权功能.您应该可以使用它在您的网站上设置身份验证.

If you're using ASP.NET MVC, it comes with authentication/authorization out of the box. You should be able to use that to setup authentication on your site.

或者,您可以设置应用程序服务器设置-IIS允许您在服务的特定站点上设置用户名/密码,而不管实际的应用程序可以做什么.如果您有权访问应用服务器,这可能是最好的解决方案.

Alternatively you could setup app server settings - IIS lets you setup username/password on a specific site it's serving, regardless of what the actual application may do. If you have access to the app server this might be the best solution.

如果您使用的是IIS6,则可以轻松设置授权.右键单击您的站点>属性>目录安全性选项卡>身份验证和访问控制>编辑,然后输入您选择的用户名/密码.完成.

If you're using IIS6, you can setup authorization easily. Right-click on your site > Properties > Directory Security Tab > Authentication and Access Control > Edit, and enter a username/pwd of your choice. Done.

这篇关于为网站设置私人测试版的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆