Solved

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

Posted on 2012-12-25
5
714 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

On July 14th 2015, Windows Server 2003 will become End of Support, leaving hundreds of thousands of servers around the world that still run this 12 year old operating system vulnerable and potentially out of compliance in many organisations around t…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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 …

752 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