VMware Cloud Community
madhanSakthi
Contributor
Contributor

is it possible to keep the Vsphere webclient session active always ?

I ve developed a .net application to access the vsphere server and perform tasks on it.

In my application im opening the console of a virtual machine in a browser by generating an url for the vm, as it is mentioned in http://www.virtuallyghetto.com/2011/10/how-to-generate-vm-remote-console-url.html.

But the console is opening only when the web client is already logged in in another tab in the browser, else "null" is displayed in the webpage.

so i need to keep the web client logged in in the browser always or i should open the client and login through the c# code.

Pls suggest some way to resolve this.

thanks

0 Kudos
7 Replies
Anjani_Kumar
Commander
Commander

You can extend the timeout for your webclient by setting it to 0. so it will not never let you logout. below is the procedure.

1

On the computer where the vSphere Web Client is installed, locate the webclient.properties file.

The location of this file depends on the operating system on which the vSphere Web Client is installed.

Operating System

File path

Windows 2003

%ALLUSERSPROFILE%Application Data\VMware\vSphere Web Client

Windows 2008

%ALLUSERSPROFILE%\VMware\vSphere Web Client

vCenter Server Appliance

/var/lib/vmware/vsphere-client

2

Edit the file to include the line session.timeout = value where value is the timeout value in minutes.

To set the client to never time out, specify a negative or 0 value for the timeout.

For example, to set the timeout value to 60 minutes, include the line session.timeout = 60.

3

Restart the vSphere Web Client service.

On Windows operating systems, restart the VMware vSphere Web Client service.

On the vCenter Server Appliance, restart the vSphere-client service.

Please consider marking this answer "correct" or "helpful" if you found it useful. Anjani Kumar | VMware vExpert 2014-2015-2016 | Infrastructure Specialist Twitter : @anjaniyadav85 Website : http://www.Vmwareminds.com
0 Kudos
UmeshAhuja
Commander
Commander

Hi,

 

Configure the vSphere Web Client Timeout Value

By default, vSphere Web Client sessions terminate after 120 minutes of idle time, requiring the user to log in again to resume using the client. You can change the timeout value by editing the webclient.properties file.

  1. On the computer where the vSphere Web Client is installed, locate the webclient.properties file. The location of this file depends on the operating system on which the vSphere Web Client is installed.

Operating System

File path

Windows 2003

%ALLUSERSPROFILE%Application Data\VMware\vSphere Web Client

Windows 2008

%ALLUSERSPROFILE%\VMware\vSphere Web Client

vCenter Server Appliance

/var/lib/vmware/vsphere-client

 

2. Edit the file to include the line session.timeout = value where value is the timeout value in minutes.

                NOTE: To set the client to never time out, specify a negative or 0 value for the timeout.

                For example, to set the timeout value to 60 minutes, include the line session.timeout = 60.

 

3.  Restart the vSphere Web Client service.

      • On Windows operating systems, restart the VMware vSphere Web Client service.
      • On the vCenter Server Appliance, restart the vSphere-client service.

  

Thanks n Regards
Umesh Ahuja

If your query resolved then please consider awarding points by correct or helpful marking.
0 Kudos
madhanSakthi
Contributor
Contributor

Thanks for the reply. I'm just accessing the vsphere server through a web link.

I dont understd how installation path comes here ? pls clear me if im missing something.

Thanks.

0 Kudos
UmeshAhuja
Commander
Commander

Hi,

Its not a installation... You just need to locate the web client file and edit with the settings and save it to get the requirement as per your wish.

Thanks n Regards
Umesh Ahuja

If your query resolved then please consider awarding points by correct or helpful marking.
0 Kudos
Anjani_Kumar
Commander
Commander

Dont you have access on the vcenter or the location where is the webclient exe has been installed? as its a component of vcenter installation. and you need to modify the same location via login in to the vcenter or vcsa .

Please consider marking this answer "correct" or "helpful" if you found it useful. Anjani Kumar | VMware vExpert 2014-2015-2016 | Infrastructure Specialist Twitter : @anjaniyadav85 Website : http://www.Vmwareminds.com
0 Kudos
madhanSakthi
Contributor
Contributor

I dont find any webclient.properties file in my local machine. Well, everything is hosted in our server. So i guess the file should be available in my server and unfortunately i dont ve access to the file.

I just have a login id to make use of the resources available in the vsphere server.

Is it possible to set the timeout value only for my login id ?

Thanks.

0 Kudos
Anjani_Kumar
Commander
Commander

Afaik, there is not any way apart from that which can preserve your session for long time.

But you can achieve it in a tricky way. As browser get logged out if no activity is there, you can set autorefresh of your browser so your session will not be logged out. This is an workaround for your issue.

(Note: you can google the multiple way to set auto refresh interval for your browser. Smiley Wink

Please consider marking this answer "correct" or "helpful" if you found it useful. Anjani Kumar | VMware vExpert 2014-2015-2016 | Infrastructure Specialist Twitter : @anjaniyadav85 Website : http://www.Vmwareminds.com