By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,899 Members | 1,190 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,899 IT Pros & Developers. It's quick & easy.

how to collect all clients log files and show at server?

P: 3
Expand|Select|Wrap|Line Numbers
  1. private void btnlogin_Click(object sender, EventArgs e)
  2.         {
  3.             string dir = "D://Login.hhh";
  4.  
  5.             if (!File.Exists(dir))
  6.             {
  7.                 File.Create(dir);
  8.             }
  9.  
  10.             string filePath = dir;
  11.  
  12.             string s = System.Environment.GetEnvironmentVariable("COMPUTERNAME");
  13.  
  14.             string s1 = getIP();
  15.  
  16.             using (StreamWriter swrObj = new StreamWriter(filePath, true))
  17.             {
  18.                 swrObj.Write(s1 + "|" + s + "|" + Txtusername.Text + "|" + "user logged in on :|" + DateTime.Now.ToShortDateString() + " at " + DateTime.Now.ToShortTimeString());
  19.  
  20.                 swrObj.Write("\t\t");
  21.  
  22.                 swrObj.Write("\t\t");
  23.  
  24.                 swrObj.WriteLine();
  25.  
  26.                 MessageBox.Show("Login success");
  27.             }
  28.         }
iam using above code to create a log file ita working in a single user application(this is in windows not in asp),but how it will work in multiuser environment,i want collect all clients info and show at server ?how to that plz help me any one
Jan 2 '13 #1
Share this Question
Share on Google+
2 Replies


PsychoCoder
Expert Mod 100+
P: 465
I guess I'm not completely understanding what you're going for here. Can we get a better explanation of what you're trying to accomplish please :)
Jan 3 '13 #2

P: 10
"The log Files are created by the Client Application I Hope"

Then you need to write some code to upload that Log File to server

But if you don't have the capacity or resource to change the existing code in the application


Then you have to access the Log File using some other application let's say C# then upload that to the remote server.

But make sure you have necessary privilege to run those kinds of apps from the client machine.

Good Day
Jan 15 '13 #3

Post your reply

Sign in to post your reply or Sign up for a free account.