locked
Gotcha's when running application under remote desktop? RRS feed

  • Question

  • I have got a windows service written in VC++  and I've had a bug reported from a user that the service behaves differently when running under a Remote Desktop.

    I don't want to go into too much detail into what the service is doing other that to say it is trying to install some internet explorer cab files and end up doing not doing it properly.

    The question I have is, 'Are they any obvious things I should be looking at that are different when running an app in a remote desktop as opposed to running on a 'real' desktop? Are there any special precautions you need to take when running under remote desktop?'

    Thanks.
    Friday, June 8, 2007 11:13 AM

Answers

  • Hmm, well, remote desktop runs the application in the context of the remote machine so it will follow all security settings on that machine. So the obvious thing here is that perhaps the remote machine doesn't have full access to something. But all in all there shouldn't be any difference.

    As a suggestion, try testing your service under a remote desktop situation and see if the error appears and compare it to running the service locally on that machine.

    Friday, June 8, 2007 4:22 PM
  • One of the things that tend to bite people are kernel object namespaces. IIRC client process default to the local session whereas Services and Console Sessions default to the global namespace.

     

    To be on the safe side you should add the desired namespace prefix explicitly when creating or opening named kernel objects.

     

    -hg

    Friday, June 8, 2007 4:34 PM

All replies

  • Hmm, well, remote desktop runs the application in the context of the remote machine so it will follow all security settings on that machine. So the obvious thing here is that perhaps the remote machine doesn't have full access to something. But all in all there shouldn't be any difference.

    As a suggestion, try testing your service under a remote desktop situation and see if the error appears and compare it to running the service locally on that machine.

    Friday, June 8, 2007 4:22 PM
  • One of the things that tend to bite people are kernel object namespaces. IIRC client process default to the local session whereas Services and Console Sessions default to the global namespace.

     

    To be on the safe side you should add the desired namespace prefix explicitly when creating or opening named kernel objects.

     

    -hg

    Friday, June 8, 2007 4:34 PM
  • The kernel objects namespace plays a major role when your application runs from remote desktop. while creating any kernel objects like events, semaphores, mutexes, waitable timers, file-mapping objects, and job objects, you should add Global\ prefix to make them global for all sessions.

    More details will be available at,

    http://msdn.microsoft.com/en-us/library/aa382954(VS.85).aspx

    CTO, net-square
    Friday, August 8, 2008 7:52 AM