Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to get IP address and user name use FileSystemWatche
Message
De
01/09/2008 17:50:58
 
 
À
18/08/2008 04:49:45
Vijay Kumar
DNS ERP Pvt Ltd
Inde
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB.NET 1.1
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01336510
Message ID:
01343929
Vues:
60
Sorry Vijay ... I missed that part of your question ... I guess I assumed that FileSystemWatcher had the properties you needed.

This sounds more like you need some server utilities. I googled "monitor server file activity" and got lots of hits. You might want to look at some of them.

~~Bonnie




>>I want to get all events using FileSystemWatcher
>>
>>such as Created,Deleted,Rename, Changed,Event Time, UserName,IP Address
>
>It seemed like it would be fairly straightforward to me, so I tried it real quick. It didn't work and it wasn't until I read the documentation that I saw *why* it didn't work. You've got to set one extra property (EnableRaisingEvents) to true to tell it *when* to begin watching (raising the events). Seems a bit odd to me, but that's the way it works.
>
>
>// declaration
>FileSystemWatcher oWatch;
>
>// setup
>this.oWatch = new FileSystemWatcher(@"c:\DotNetApps\");
>this.oWatch.Changed += new FileSystemEventHandler(oWatch_Changed);
>this.oWatch.Created += new FileSystemEventHandler(oWatch_Created);
>// etc.etc.
>this.oWatch.EnableRaisingEvents = true;
>
>// event handlers
>private void oWatch_Created(object sender, FileSystemEventArgs e)
>{
>	MessageBox.Show(string.Format("Created: {0}, {1}", e.Name, e.ChangeType));
>}
>
>private void oWatch_Changed(object sender, FileSystemEventArgs e)
>{
>	MessageBox.Show(string.Format("Changed: {0}, {1}", e.Name, e.ChangeType));
>}
>// etc.etc.
>
>
>Hi,
>Firstly Thanks for Help
>
>I use the above code and I get all events with the directories and files but donot get the user name and IP address
>When I use getIp API function then it desplay the local user name and ip
>
>If I want to watch all users activity through server then how to get using FileSystemWather
>
>Regards
>Vijay
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform