在特定时间后如何阻止我的Web应用程序 [英] How to block my web application after a specific time

查看:69
本文介绍了在特定时间后如何阻止我的Web应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

我在asp.net中有一个项目,我希望下午6点以后没有人可以登录

它将在上午8点启用,并在下午6点停止.


谢谢................

Hello

I have a project in asp.net and I want that no one can login after 6 p.m.

It will active at 8 a.m. and stop at 6 p.m.


Thanks................

推荐答案

编写一个IHTTPModule并处理BeginRequest事件,检查时间并适当处理.正如OriginalGriff指出的那样,您需要解决本地时间与服务器时间之间的时差.
Write an IHTTPModule and handle the BeginRequest event, check for the time and handle appropriately. As OriginalGriff pointed out you''ll need to address the differences between local and server time.


这篇关于在特定时间后如何阻止我的Web应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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