473,385 Members | 1,593 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Enumerate terminal servser sessions using C#.

I am new to C#! I need to enumerate TS sessions (including sessions running
in non-application mode) using a C# application. Can this be done using a
"TS-WMI" provider? Any input will be appreciated!
Moses
Nov 16 '05 #1
2 3910
TS WMI provider is for Windows 2003 server only, so if all of your servers
are 2003 server that approach would work.

Alternatively you could use the TS API methods; WTSOpenServer(),
WTSEnumerateSessions(), WTSQuerySessionInformation() etc by using DllImport.
Arild
"Moses M" <Mm*****@msn.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I am new to C#! I need to enumerate TS sessions (including sessions running in non-application mode) using a C# application. Can this be done using a
"TS-WMI" provider? Any input will be appreciated!
Moses

Nov 16 '05 #2
Thanks for the input!
-- Moses

"Arild Bakken" <ar*****@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
TS WMI provider is for Windows 2003 server only, so if all of your servers
are 2003 server that approach would work.

Alternatively you could use the TS API methods; WTSOpenServer(),
WTSEnumerateSessions(), WTSQuerySessionInformation() etc by using DllImport.

Arild
"Moses M" <Mm*****@msn.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I am new to C#! I need to enumerate TS sessions (including sessions

running
in non-application mode) using a C# application. Can this be done using a "TS-WMI" provider? Any input will be appreciated!
Moses


Nov 16 '05 #3

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

Similar topics

3
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...
2
by: Arsen Vladimirskiy | last post by:
Hello, Is there a way to enumerate (or iterate through) all the current sessions of an ASP.NET application? For example, I want to write a file current-session.aspx that will tell me the...
6
by: Rich Crusco via DotNetMonster.com | last post by:
I am looking for a way to convert the following vbs script to c# Const ADS_SECURE_AUTHENTICATION = 1 strADMIN = "adminaccount" strPASSWORD = "password" strUSER = "useraccount" Set dso =...
1
by: mwolf | last post by:
I have an application written in c$ that needs to be run in 3 different terminal server sessions on a windows 2003 server. Everything will work fine for about an hour, after this point the...
5
by: Gaetan | last post by:
I would like to guarantee that only one session at a time can request exclusive access to an object stored in Application. The ownership of the object must last throughout multiple HTTP requests. ...
0
by: ML | last post by:
We have a rather large vb.net winform app that multiple users access via sessions on s terminal server. We are running into issues where the application seems to be bogging down the terminal...
3
by: tommcd24 | last post by:
I have an in-house VB.NET 2.0 application that uses Crystal Reports for ..NET 2005 - CR10?). A few users access the program via a Wyse dumb-terminal via Citrix. For some reason that I've not been...
7
by: mike | last post by:
We have numerous Access 97 apps that we run on our Terminal Server, but two apps in particular is giving us a problem. The problem we are running into is when you select a drop down menu, it errors...
16
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. ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.