Click here to Skip to main content
15,113,873 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i have developed an application in which an employee can time-out and time-in manually. If he has time-in himself and he is not interacting with the keyboard and mouse so the application automatically time-out himself.

For example if i am not using computer for five mins computer will log off automatically the same phenomenon is applied above.
PIEBALDconsult 19-Nov-13 8:54am
Sounds user-hostile.
Ron Beyer 19-Nov-13 8:56am
This should be a local/network computer policy, not something enforced through a web-page.

You can't do that in a web page. First, any code you write in C# in your ASP.NET app runs on the server only, NOT THE CLIENT! You'd be locking the server console, but not the console you see on the screen. Since ASP.NET code runs in IIS and that runs as a service, you'd be locking the service desktop, NOT the desktop you see on the monitor.

You can't lock a users desktop from inside a web page.
You can log out the user after certain time, if he/she does not interact with the Web Page.
You have to define the Timeout in web.config file.
Check- ASP.NET Session State[^]

You can also go for some jQuery stuffs.
1. jquery-idleTimeout[^]
2. jQuery idleTimer Plugin[^]
you need to do that with javascript

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900