asp.net mvc 离线测试
我需要在实时“asp.net mvc”网站中测试一项功能,并且希望在测试时阻止对该网站的访问,您建议如何执行此操作?是否可以阻止访问并仍然能够以匿名用户身份进行测试? (我需要以未登录的用户身份测试该过程)。
I need to test a feature in a live "asp.net mvc" web site and would want to block access to the site while testing, how would you recommend doing that? Is it possible to block access and still be able to test as an anonymous user? (I need to test the process as a user that's not logged in).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议您创建 HttpModule 来检查 IsTesting 属性是否设置。
如果 IsTesting 为 true,则将所有请求重定向到 under_construction.html,来自特定 IP 地址的请求除外。
I would recommend you to create HttpModule that will check is IsTesting property is set.
If IsTesting is true, than redirect all requests to under_construction.html, except requests from specific IP addresses.