VMware {code} Community
sam2000
Contributor
Contributor

session disconnecting problem

Hi,

I saw other threads related to session disconnecting after idle timeout of 30 mins, but did not get a solution for it. How can I know whether session is still active or not and reconnect if disconnected?

_service.SessionIsActive is giving "Operation not implemented by server" error.

Any help appreciated.

Thanks,

Sam

0 Kudos
3 Replies
stumpr
Virtuoso
Virtuoso

I don't believe SessionIsActive is available on stand alone ESX hosts. You can instead get the CurrentSession property from the SessionManager. If this isn't set, then you're not logged in. You can either just use the CurrentSession property against HostAgents and VirtualCenter, or just use the About property to determine the apiType and call whichever is needed. SessionIsActive lets you validate the state of more than just your current session of course.

Reuben Stump | http://www.virtuin.com | @ReubenStump
0 Kudos
sam2000
Contributor
Contributor

Thanks stumpr so much. I am able to use CurrentSession property successfully.

Regards,

Sam

0 Kudos
Anandraj
Contributor
Contributor

Hi,

Can anyone post code for getting currentsession using C#...

Thanks...

0 Kudos