ASP.Net is a bad choice for this requirement. ASP.Net runs on the server, but I want to track some client side events. For security reasons, a web page can't have such privileges without the use of ActiveX or browser plugin, but it's complex to write, complex to deploy and a big opened window to security breaches.
I understood the differences between a windows application and a web application. The VC++ library is for windows applications and can't be used by a web application.
There is a way to achieve this, I have to use javascript to track mouse move, and redirect the user to a logout script if the mouse doesn't move for a specific amount of time.
But There is absolutely no way I can monitor keystrokes or mouse movement outside the website on clients computer. And that's a good thing! Just imagine how that would be in the hands of the wrong people. So if its achievable also, it should not be encouraged.
So I m closing the question and have started the same task in WPF.