Solved

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

Posted on 2012-12-25
5
700 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
Comment Utility
0
 

Author Comment

by:ksd123
Comment Utility
Hi,

I am looking for c# code.
0
 
LVL 13

Expert Comment

by:Yagya Shree
Comment Utility
0
 

Accepted Solution

by:
ksd123 earned 0 total points
Comment Utility
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
Comment Utility
Did not get any relevant answer to my question and to my knowledge the above solution will resolve the issue
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Join & Write a Comment

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
A quick step-by-step overview of installing and configuring Carbonite Server Backup.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

744 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now