Logging off users on a RDP server, if application crashes

We have an Access application running on a remote server.  This server is locked down and opens our application at login.  When they exit the application - it runs the Logoff function and takes them back to their local desktop.  

I have put several functions into the Access application that will allow users to logoff - should an issue occur.  However, I do see a possibility of something going wrong and the user not being able to log out.  The Taskbar/Desktop/TaskManager are all hidden, so if something did get to the point where they were looking at a black screen - they would need someone else to log them off of the server, which is not acceptable.

I was thinking of writing a small c# process, that is triggered by the Access application once it has loaded.  It would pass the process ID the the c# app, which would then monitor the process ID, to see if it's still running.  If not (i.e a crash has taken place), it would log the user off.

Is this a good idea, and as I'm pretty new to c#, does anyone have any pointers (or better suggestions)?
Andy BrownDeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gustav BrockCIOCommented:
Make it a runtime. It will close down - or ask the user to do so - if it runs into troubles your error handling doesn't catch.

Andy BrownDeveloperAuthor Commented:
Thanks Gustav - good to hear from you - hope all is well.

OK - that's a good point.  Do you think it's a sound idea, or would you do it differently?
Gustav BrockCIOCommented:
We've used the runtime environment for decades with zero issues. Should an error occur, a message is popped, and the only choice for the user is to close the application.

If you need to do something afterwards, you could launch the application from a shortcut that opens a batch/command/powershell file which launched Access, then waits for this to finish before moving on calling your termination command(s).


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Andy BrownDeveloperAuthor Commented:
Great stuff - makes sense.

Thank you Gustav - all the bset.
Gustav BrockCIOCommented:
Thanks. You are welcome!

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Remote Access

From novice to tech pro — start learning today.