.NET 的网站邀请系统/测试版锁定?
是否有任何适用于 .NET 的开源解决方案(首选 C# / MVC)允许在私人滚动 Beta 场景中使用简单的锁定和邀请系统?
除非用户登录(可能使用全局操作过滤器),否则用户几乎会被重定向到启动页面...
以下是其他语言的几个类似的解决方案:
https://github.com/ejdraper/exclusivity (Ruby)
https://github.com/pragmaticbadger/django-privatebeta (Python)
Are there any open source solutions for .NET (prefer C# / MVC) that allow for simple lockdown and invitation system useful in a private rolling Beta scenario?
Pretty much where the user would be redirected to a splash page unless they are logged in (perhaps using Global Action Filters)...
Here are a couple similar solutions in other languages:
https://github.com/ejdraper/exclusivity (Ruby)
https://github.com/pragmaticbadger/django-privatebeta (Python)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我为 ASP.NET MVC 编写了一个由配置文件驱动的小型“访问控制”过滤器。我可以在 web.config 中切换一个标志,该标志会将所有未注册的用户移动到特定页面,除非他们特别请求登录或注销操作。您可以相应地调整您的实现,而不会遇到太多麻烦。
过滤器属性
配置处理程序
Web.config 示例
通过上述配置,任何未登录或不是“Members”角色成员的用户' 将被重定向到 '~/inviteonly.htm'。您可以通过用逗号分隔“allowRoles”和“allowUsers”属性中的值来指定多个允许的角色和/或用户。
AccessControlAttribute 必须注册为全局过滤器,或者放置在 BaseController 类定义中才能使一切正常工作。
I wrote a small 'access control' filter for ASP.NET MVC that is config file driven. I can switch a flag in my web.config which will move all unregistered users to a specific page unless they specifically request the login or logout actions. You could adapt your implementation accordingly without much trouble.
Filter Attribute
Config Handler
Example Web.config
With the above configuration, any user who is not logged in or not a member of the role 'Members' would be redirected to '~/inviteonly.htm'. You can specify multiple allowed roles and/or users by comma-separating the values in the 'allowRoles' and 'allowUsers' attributes.
The
AccessControlAttribute
must be registered as a global filter or alternatively placed on a BaseController class definition to get everything working.