473,569 Members | 2,617 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Who is logged on Win2003 Server?

In task manager of Win2003 Server, I can see who is logged on. I want to
programmaticall y access this information. Is there a log file or something
I can access to get it?

Thanks,
Brett
Nov 21 '05 #1
4 3610
I think this is what you want:

MessageBox.Show (Environment.Us erName)
Nov 21 '05 #2
"Brett" <no@spam.com> schrieb:
In task manager of Win2003 Server, I can see who is logged on. I want to
programmaticall y access this information. Is there a log file or
something I can access to get it?


You can do that using p/invoke:

List of sessions on a system:

Platform SDK: Authentication -- Enumerating Logon Sessions
<URL:http://msdn.microsoft. com/library/en-us/secauthn/security/enumerating_log on_sessions.asp >

Information about each session:

Platform SDK: Authentication -- Retrieving Logon Session Information
<URL:http://msdn.microsoft. com/library/en-us/secauthn/security/retrieving_logo n_session_infor mation.asp>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #3
That's not it:
"Gets the user name of the person who started the current thread."

I want all users logged onto the Win2003 server box via FTP for example.

Brett

"Crouchie19 98" <cr**********@d iscussions.micr osoft.com> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
I think this is what you want:

MessageBox.Show (Environment.Us erName)

Nov 21 '05 #4

"Herfried K. Wagner [MVP]" <hi************ ***@gmx.at> wrote in message
news:OK******** ******@TK2MSFTN GP14.phx.gbl...
"Brett" <no@spam.com> schrieb:
In task manager of Win2003 Server, I can see who is logged on. I want to
programmaticall y access this information. Is there a log file or
something I can access to get it?


You can do that using p/invoke:

List of sessions on a system:

Platform SDK: Authentication -- Enumerating Logon Sessions
<URL:http://msdn.microsoft. com/library/en-us/secauthn/security/enumerating_log on_sessions.asp >

Information about each session:

Platform SDK: Authentication -- Retrieving Logon Session Information
<URL:http://msdn.microsoft. com/library/en-us/secauthn/security/retrieving_logo n_session_infor mation.asp>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>


If some one logs onto the box via say Serv-U (non IIS) FTP server, while the
above hold the user value some how?

Thanks,
Brett
Nov 21 '05 #5

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

Similar topics

0
1513
by: Scott Townsend | last post by:
We are trying to get the Microsoft ASPFileUpload to work on both Win2003 and Win2000 http://support.microsoft.com/default.aspx?scid=kb;en-us;q299692 We can now get large and small files on our Development machine. (Win2003 IIS6) Though now that we have posted it to the Production server we cant seems to upload small files. The Production...
0
1374
by: Randy | last post by:
Hi all, I'm a developer on the database backend and need to figure out how to get a c++ .net executable to run on a win2003 server. The executable transfers data between oracla and sql server for datawarehousing. I dont know much ..net. It works fine on win2000 and my group has set up another win2000 server and migrated to that one OK....
6
1109
by: Wardeaux | last post by:
Is there an article on how to configure Win2003 so that I can use with Visual Studio for ASP.NET development? I loaded Win2003, copied over my previous ASP.NET code, and still can't load the projects... any hints on what I'm doing wrong? MTIA, wardeaux
3
2475
by: Johanna | last post by:
Hello, Thread was being aborted exception is thrown by IIS for my asp.net application on win2003 server. This error has not yet occured with the same asp.net application on windows 2000 professional computers that are also lot older and less effective. And this error does not occure if this thread is run by console application. This...
4
1332
by: Adrian Parker | last post by:
I have a web app that has one problem when deployed on win2003 but works fine on win2k. On a page, I have a button that causes a reload of the page with a different set of querystring values (to move to next week) the codebehind the button just says Response.Redirect("mypagename.aspx?year=2005&month=11&day=21")
2
1489
by: Don Rich | last post by:
Please share with me any ideas you may have for troubleshooting and resolving the subject problem. I can give more details as necessary. (Please advise if I should post this problem to a more specific group.) Here's the situation in a nutshell. We're using WinXP Pro workstations configured to a common standard on a nation-wide...
2
1977
by: gilad.kapel | last post by:
Hi I have a system composed of sevral DLLs all round up into one WebService. I'm working with VS2005 Framework 2.0 under WinXP. The system is at the end of its development stage and was both checked on a WinXP & Win2003 32bit systems on the same computer (Standard P4 - 3GHz with 1Mb of ram)
0
1390
by: nosipho | last post by:
Hi guys I have a Win@2003 Server.I mapped a drive( T) in Win2003 ,now I want to copy files from C drive on the server( Win2003) and paste them on the T drive ( the new drive I mapped). I've given full control to both drives ,but it doesn't seem to work. When I try to paste the files ,it gives me a message saying " no rights to access/ the disk is...
1
1486
Carrugar
by: Carrugar | last post by:
I'm having a major problem with an ASP application. Our ASP code has been migrated from NT4 (IIS4.0) to a Win2003 (IIS6.0) server. However, there seems to be a problem with the VB scripts. Whenever a VB function is called I get a Runtime Error "Object Expected". These are client-side scripts so I cant see how having a different server is...
0
7615
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
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. ...
0
8130
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...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
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...
0
3643
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2115
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
1
1223
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
940
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...

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.