473,696 Members | 1,873 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4041
> 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("CLIENT NAME")
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.c om> wrote in message
news:%2******** *******@TK2MSFT NGP14.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("CLIENT NAME")
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.c om> wrote in message
news:%2******** *******@TK2MSFT NGP14.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("CLIENT NAME")
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.c om> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
Ohh shame.


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

Rob.

Nov 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2054
by: ACP | last post by:
Hi all, Have a situation that my company has never run across before. Client is running NT4 for the domain server, using terminal services 2000 and running an application with a SQL Server backend and they are experiencing locking problems. Once one person gets locked out then everyone trying to access that tables is also locked out as a result. It is not specific to a certain User, or module within the application. It's not a...
3
5575
by: Josh Schmidt | last post by:
How can one set the terminal services profile and home directory path in AD using VB.NET? I can set the usual profile paths, but terminal services properties are not supported with ADSI. Any help is greatly appreciated! Josh
16
2883
by: Justin Lazanowski | last post by:
Cross posting this question on the recommendation of an I have a .NET application that I am developing in C# I am loading information in from a dataset, and then pushing the dataset to a grid, or other controls depending on the particular form. This application is setup with one MDI parent calling MDI children with the exception of one Modal form (the report viewer). When I run the application and run one of the screens that pulls...
9
5721
by: me | last post by:
I need to write the client part of a virtual channel for terminal services in c#. I have already done the server part and it works just fine in c#. My problem is exporting the function is requires me to export on the dll, I have no idea how to do that from c#. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/termserv/termserv/virtual_channel_client_dll.asp Thanks,
6
1340
by: trinitypete | last post by:
Hi All, Here is what I would like to do, any advice would be greatly appreciated. I have a forms authenticated web page that accepts user credentials, these credentials are then looked up in a SQL DB, from these credentials we can tell if the the user is an employee or customer. If the user is a customer they are redirected to an ecommerce site, whereas if the user is an employee then I would like to somehow allow the user to connect...
8
2735
by: OHM | last post by:
Hi peoples, I dont know where to place this question, so as I know you guys are all resourceful experts, I thought I would try here. I am writing some code which will be run usingh remote desktop ( On windows 2003 Server ), I need to determine in the code the machine name and username. If I use GetUsername and GetMachineName, it simply gives me the name of the currently logged on user ( at the Server ) and the Servers Machine Name.
3
1742
by: shawn | last post by:
In the past I have had SQL and Terminal server on the same PC. With SQL and Windows 2003 Terminal server, you can not have them on the same PC. How can I make this work with SQL and Terminal and 2 different PC's? I have 30 users that need to log on to my SQL database.
5
2001
by: cityrock | last post by:
Hello friends. It has come time for me to face a dilema i have been thinking about for a long time, but actually doing nothing. Now its time to act. The situation is "simple", and i have just spent hours reading other posts regarding the advantages and disadvantages upgrading my mdb (jet engine) to an sql BE. I am the system engineer, administrator and programmer of our company's database. Our mdb FE is very complex, using hundreds of...
16
3990
by: =?Utf-8?B?RHdlZWJlcmVsbGE=?= | last post by:
I created an Access 2007 application for my customer. The application is shared by three employees on a server. It maintains a contact list including financial data and social security numbers. Only the office manager generates reports in Access from this client data. Now they want to share this Access application with employees at a remote office. They expect to have a maximum of 30 employees editing the client list in both the...
0
9140
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9005
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8869
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7693
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5848
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4351
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3025
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2304
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1988
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.