Solved

How do I get log details (current logon user /machine name) on remote server in window application?

Posted on 2012-12-25
5
709 Views
Last Modified: 2013-01-18
Hi ,

We have a developed a windows application using c# to start/stop/execute a service (windows service written in .Net) on a remote server.

I need to maintain log information for the current logon user who started /stopped/executed the service on the remote server.That means on the remote server we need details(current logon user who invoked the service) in the  event viewer . How can I achieve this?

Basically we have 3 buttons for start,stop,execute functions and below is simplified piece of code and need to maintan user log information(machine name/current logon user)  on remote server Event viewer.

//  start / stop / execute buttons

try

{

servicecontroller sc =new servicecontroller(servicename,machinename)

sc.start();

}

catch(exeception ex)

{

}
0
Comment
Question by:ksd123
  • 3
  • 2
5 Comments
 
LVL 13

Expert Comment

by:Yagya Shree
ID: 38720201
0
 

Author Comment

by:ksd123
ID: 38720601
Hi,

I am looking for c# code.
0
 
LVL 13

Expert Comment

by:Yagya Shree
ID: 38720739
0
 

Accepted Solution

by:
ksd123 earned 0 total points
ID: 38772444
I think the only option to get  current logon deails on remote server  is to create a webservice and host it on the remote server - This webservice has methods for creating event log entries. We need to pass the logged in user information to the webservice which will create the events
0
 

Author Closing Comment

by:ksd123
ID: 38792313
Did not get any relevant answer to my question and to my knowledge the above solution will resolve the issue
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Setting up a Microsoft WSUS update system is free relatively speaking if you have hard disk space and processor capacity.   However, WSUS can be a blessing and a curse. For example, there is nothing worse than approving updates and they just have…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question