So I have a request from a manager to allow our users to logoff of our website by clicking a logoff button on the main navigation bar from our site. The users connect to the web site via remote desktop since we have reports that can be viewed which are 200-300 MB on average (some heavy on the fly OLAP going on here). The web site is on one server, while the terminal server and reports reside on another server.
In a nutshell, my manager wants me to replicate the action of a user x'ing out of an RDP session implemented into a button on the page (don't ask me why). So basically when the user clicks the button, I catch the event on the server side, and then need to connect to the remote RDP terminal server, and finally issue the logoff for that person. I have chosen to go the WMI route although I have also extensively researched using a pinvoke of the WTS_XXX methods.
I am explicitly passing in the server name and use ...
Go to the complete details ...