Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Network Access monitoring

Network Access monitoring

Scheduled Pinned Locked Moved C#
sysadmincsharpdotnethelplounge
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sundar156
    wrote on last edited by
    #1

    Hi, I am using .Net Framework 1.1 Is it possible to watch a directory for any changes,like we have FileSystemWatcher for files. (or) Is it possible to raise an Event if a shared directory is being accessed in windows. Actually my problem is simple, I have an application in which i have to monitor network access.If a user in the network tries to access a folder in the network a message is sent to the server indicating that a user is trying to access the network.The server decides to allow or deny permission for the user to view the directory at random. note:I have a service running in the server and another in the client. Any Ideas .., Thanks un advance...

    Luck is Opportunity with hardwork

    I 1 Reply Last reply
    0
    • S sundar156

      Hi, I am using .Net Framework 1.1 Is it possible to watch a directory for any changes,like we have FileSystemWatcher for files. (or) Is it possible to raise an Event if a shared directory is being accessed in windows. Actually my problem is simple, I have an application in which i have to monitor network access.If a user in the network tries to access a folder in the network a message is sent to the server indicating that a user is trying to access the network.The server decides to allow or deny permission for the user to view the directory at random. note:I have a service running in the server and another in the client. Any Ideas .., Thanks un advance...

      Luck is Opportunity with hardwork

      I Offline
      I Offline
      Ingo
      wrote on last edited by
      #2

      sundar156 wrote:

      Is it possible to watch a directory for any changes,like we have FileSystemWatcher for files.

      You can use the FileSystemWachter for watching Directories (look in the documentation for "FileSystemWatcher class, about FileSystemWatcher class"). It should work, as I know, but I'm working with .Net 2.0 Regards, Ingo

      ------------------------------ PROST Roleplaying Game War doesn't determine who's right. War determines who's left.

      S 1 Reply Last reply
      0
      • I Ingo

        sundar156 wrote:

        Is it possible to watch a directory for any changes,like we have FileSystemWatcher for files.

        You can use the FileSystemWachter for watching Directories (look in the documentation for "FileSystemWatcher class, about FileSystemWatcher class"). It should work, as I know, but I'm working with .Net 2.0 Regards, Ingo

        ------------------------------ PROST Roleplaying Game War doesn't determine who's right. War determines who's left.

        S Offline
        S Offline
        sundar156
        wrote on last edited by
        #3

        thanks for the reply... But a FileSystemWatcher can only watch for created ,Renamed ,Changed,Deleted Events...(i Have to generate an event when a user clicks on the folder or file i.e before he opens a file) I should not allow the user to open the folder/File untill the Server(or an admin in the server machine) permits. Any help is appreciated....

        Luck is Opportunity with hardwork

        I 1 Reply Last reply
        0
        • S sundar156

          thanks for the reply... But a FileSystemWatcher can only watch for created ,Renamed ,Changed,Deleted Events...(i Have to generate an event when a user clicks on the folder or file i.e before he opens a file) I should not allow the user to open the folder/File untill the Server(or an admin in the server machine) permits. Any help is appreciated....

          Luck is Opportunity with hardwork

          I Offline
          I Offline
          Ingo
          wrote on last edited by
          #4

          sundar156 wrote:

          But a FileSystemWatcher can only watch for created ,Renamed ,Changed,Deleted Events...(i Have to generate an event when a user clicks on the folder or file i.e before he opens a file) I should not allow the user to open the folder/File untill the Server(or an admin in the server machine) permits.

          Ok, now I see your problem. Well thats difficult. It has something to do with the rights management and I think it can't be solved easily. I don't know a really good solution but I got an idea. You could just regret the user the access and allow your own application the access. A user has then to use this application to open a file/directory forbidden to him. Of course than it's possible to ask the admin. Sound silly? Perhaps, but I don't know another way, yet. I haven't done anything with file rights management yet. Sorry, Ingo

          ------------------------------ PROST Roleplaying Game War doesn't determine who's right. War determines who's left.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups