简体   繁体   English

什么是ASP.NET C#Ajax计时器或Jquery计时器中在线测试应用程序的最佳和安全计时器?

[英]What is best & Secure timer for online test application in asp.net C# Ajax timer or Jquery Timer?

I am creating a new application in asp.net 4.0 which contains an online test module, and the application is supposed to handle 10-20k students at a time. 我正在asp.net 4.0中创建一个新应用程序,其中包含一个在线测试模块,该应用程序一次可以处理10-20k个学生。 Now my confusion is what should i use here, which should be: 现在我的困惑是我应该在这里使用什么,应该是:

  1. Secure , I don't want kids to turn off javascript in browser and get unlimited time for test. 安全,我不希望孩子们关闭浏览器中的javascript并获得无限的测试时间。
  2. Which should not overhead the network traffic. 哪些不应该增加网络流量。
  3. Which have a pause/start function with try limits. 具有具有尝试限制的暂停/启动功能。
  4. Should fire the needed function on server side after time is complete (eg redirect to another page via c# function) 时间结束后应在服务器端触发所需的功能(例如,通过c#函数重定向到另一页)

Any help and example code is appreciated. 任何帮助和示例代码表示赞赏。

Regards 问候

Alok Sharma 阿洛克·沙玛(Alok Sharma)

FYI: I am not experienced with jquery. 仅供参考:我对jquery没有经验。

If the security of timer is critical you should not fully rely on javascript code. 如果计时器的安全性至关重要,则不应完全依靠javascript代码。 I would recommend to keep the time when test is started for a specific user on both sides, server and client. 我建议保留针对服务器和客户端双方的特定用户开始测试的时间。 Then implement javascript timer which periodically synchronizes with web server. 然后实施javascript计时器,该计时器定期与Web服务器同步。 When user completes the test and sends results to the server you should check if the timeout is elapsed on server side. 当用户完成测试并将结果发送到服务器时,您应该检查服务器端是否已超时。

In additional I would add a logic in order to ban the possibility to open the page and start test without javascript enabled. 另外,我将添加逻辑以禁止打开页面并在未启用JavaScript的情况下开始测试的可能性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM