[THIN] Re: Current Clientname

Yes that was my snippet froma few weeks ago - modifying the session.cs

One thing to note, that will provide you Domain-UserID as a result. 
If you want only UserID then you need to do some additional coding to
trim the 'Domain-' from UserID.

That's what we did.

ThinFan


On 8/1/05, Evan Mann <emann@xxxxxxxxxxxxxxxxxxxxx> wrote:
> This was posted by another member a few weeks back:
> -----
> I saw that someone already responded with the published Citrix
> solution, however that method disables workspace control.
> 
> We therefore took a different route:  We modified the Session.cs file
> and left workspace control enabled.  Now we get User Name (not
> domain-username) for the Client ID AND we have workspace control
> still.
> 
> We are still testing this method to assure no other problems, but so
> far it looks good.
> 
> Session.cs info:
> 
> Here is the original Code
> 
> Change these lines to decide how the client name is chosen:
> 
>     // Get the client name to use (create a new one, if necessary)
> 
>     String clientName =
> (String)deviceState.get(COOKIE_LOGIN_CLIENT_NAME);
> 
>     if (!MPSClientNames.isValidUniqueName(clientName)) {
> 
>         if(
> config.getWorkspaceControlConfiguration().getEnabled() ) {
> 
>             clientName = MPSClientNames.generateUnique();
> 
>             deviceState.put(COOKIE_LOGIN_CLIENT_NAME, clientName); //
> Remember for future sessions
> 
>         } else {
> 
>             // Use the old client name format when Workspace Control
> is disabled for
> 
>             // compatibility (MPS/U and MF1.8 need the old format to do
> roaming
> 
>             // reconnection).
> 
>             clientName = MPSClientNames.fromAccessToken( accessToken );
> 
>         }
> 
>     }
> 
> For example, replacing the lines above with this should always use the
> client name derived from the username:
> 
>     // Always determine the client name from the user's identity
> 
>     String clientName = MPSClientNames.fromAccessToken( accessToken );
> 
> ________________________________
> From: thin-bounce@xxxxxxxxxxxxx [mailto:thin-bounce@xxxxxxxxxxxxx] On Behalf
> Of Joe Shonk
> Sent: Monday, August 01, 2005 1:45 PM
> To: thin@xxxxxxxxxxxxx
> Subject: [THIN] Current Clientname
> 
> 
> 
> 
> Hello,
> 
>  
> 
> Does anyone know any honest to goodness utility/tool that will give you the
> ACTUAL clientname of workstation you are on?  At the same time allowing
> Citrix Workspace control to function correctly?
> 
>  
> 
> Adding ; to template.ica breaks workspace control.
> 
> W32Name from www.citrix4ge.de works intermittently. (User can roam 2-3 times
> before it breaks.  Active sessions set disconnected and do not reconnect)
> 
> Reconnact!.exe reports the WI_RanDoMBUllCrAp clientname as the
> current_clientname for the PC/ThinClient that created the initial session
> (Roam to another station and it reports Current_clientname correctly, roam
> back and we are back to WI_RanDoMBUllCrAp clientname)
> 
>  
> 
> Joe
********************************************************
This weeks sponsor: SuperSpeed
Try Us To improve performance along with other agents!
FREE 30-day Trial!
http://www.superspeed.com/servers/computing.php?ID0
**********************************************************
Useful Thin Client Computing Links are available at:
http://thin.net/links.cfm
ThinWiki community - Excellent SBC Search Capabilities!
http://www.thinwiki.com
***********************************************************
For Archives, to Unsubscribe, Subscribe or
set Digest or Vacation mode use the below link:
http://thin.net/citrixlist.cfm

Other related posts: