471,624 Members | 1,925 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,624 software developers and data experts.

Identifying ID of a Terminal Services Client

I have a Terminal Services server running Windows 2000 Server.

I need to be able to identify, in my application on that server, which
client computer is addressing that server and running that application. it
can be by IP or by machine network name... Doesn't matter.

I am using Visual Basic .Net 2003

Any help would be greatly appreciated.
Nov 21 '05 #1
6 3916
> I need to be able to identify, in my application on that server, which
client computer is addressing that server and running that application.
it
can be by IP or by machine network name... Doesn't matter.


This is (I think) easy... On our Citrix Terminal Server, the CLIENTNAME
environment variable holds the name of the client PC whereas COMPUTERNAME is
the name of the terminal server itself. So a simple Environ("CLIENTNAME")
should get you started.

Now as to whether it's Citrix Metaframe or terminal services that sets up
CLIENTNAME, I couldn't say :-) Let's hope it's the later. Don't have a raw
terminal services server to try it on.

As for IP address, I'm afraid I can't help. I'm sure there will be some API
or object library in there somewhere which resolves the client name/IP
address. It's displayed in the server manager tools so it's there
somewhere...

Good luck!

Cheers, Rob.


Nov 21 '05 #2
I should have specified that I am using a Windows 2000 Terminal Server.
does that change things?

I tried this on my Terminal Server and it gave me the machine name of the
terminal server.


"Rob Nicholson" <ro***********@nospam-unforgettable.com> wrote in message
news:%2***************@TK2MSFTNGP14.phx.gbl...
I need to be able to identify, in my application on that server, which
client computer is addressing that server and running that application.
it
can be by IP or by machine network name... Doesn't matter.
This is (I think) easy... On our Citrix Terminal Server, the CLIENTNAME
environment variable holds the name of the client PC whereas COMPUTERNAME

is the name of the terminal server itself. So a simple Environ("CLIENTNAME")
should get you started.

Now as to whether it's Citrix Metaframe or terminal services that sets up
CLIENTNAME, I couldn't say :-) Let's hope it's the later. Don't have a raw
terminal services server to try it on.

As for IP address, I'm afraid I can't help. I'm sure there will be some API or object library in there somewhere which resolves the client name/IP
address. It's displayed in the server manager tools so it's there
somewhere...

Good luck!

Cheers, Rob.

Nov 21 '05 #3
Thanks... I was looking at the wrong identifier... that works perfectly.

I really appreciate your help


"Rob Nicholson" <ro***********@nospam-unforgettable.com> wrote in message
news:%2***************@TK2MSFTNGP14.phx.gbl...
I need to be able to identify, in my application on that server, which
client computer is addressing that server and running that application.
it
can be by IP or by machine network name... Doesn't matter.
This is (I think) easy... On our Citrix Terminal Server, the CLIENTNAME
environment variable holds the name of the client PC whereas COMPUTERNAME

is the name of the terminal server itself. So a simple Environ("CLIENTNAME")
should get you started.

Now as to whether it's Citrix Metaframe or terminal services that sets up
CLIENTNAME, I couldn't say :-) Let's hope it's the later. Don't have a raw
terminal services server to try it on.

As for IP address, I'm afraid I can't help. I'm sure there will be some API or object library in there somewhere which resolves the client name/IP
address. It's displayed in the server manager tools so it's there
somewhere...

Good luck!

Cheers, Rob.

Nov 21 '05 #4
>I should have specified that I am using a Windows 2000 Terminal Server.
does that change things?
Maybe :-) CLIENTNAME is present on NT 4 TS with Citrix MF 1.8 and on Windows
2003 Server with Citrix Presentation Server 3 (new name for Metaframe).
I tried this on my Terminal Server and it gave me the machine name of the
terminal server.


Ohh shame.

Rob.
Nov 21 '05 #5
> Ohh shame.

I did of course post that before I read the second post your 'onour.

Rob.
Nov 21 '05 #6
Exactly... just like i wrote the first post before I even tried the
CLIENTNAME property...


"Rob Nicholson" <ro***********@nospam-unforgettable.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Ohh shame.


I did of course post that before I read the second post your 'onour.

Rob.

Nov 21 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Josh Schmidt | last post: by
16 posts views Thread by Justin Lazanowski | last post: by
6 posts views Thread by trinitypete | last post: by
16 posts views Thread by =?Utf-8?B?RHdlZWJlcmVsbGE=?= | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.