######A Distributed screen capture system made using ASP.NET and C#
Main goal of this applciation is to monitor the lab computers which are used by the students for their lab work. Faculty can check what students are doing using Screenshots and what all programs they are running by the complete process list,etc
There are two type of processes in this application, one will be on the ASP.NET IIS Web Server and the other will be on the Lab Computer. Usually website fetching is just request reply communication between a client browser and the IIS Webserver where the Application is hosted. But, our application needs to maintain the state and request the images from all of the lab computers, for that we have initiated a new thread on the IIS Web Server to do all the back ground fetching processing about the lab computers.
######Featured of the thread running on the IIS Webserver
- It will run a TCP Server, which listens to the Lab computer requests
- It will maintain a linked list of all the labs and computers. It is a nested list. There is a lab list and in each of the nodes, there is one more list for the lab computers.
- Each Lab Computer is stored as a node in the lab list which contains
+ public PhysicalAddress mac;
- PhysicalAddress will store the clients MAC address. MAC address is sent in a message when it logs in to the system.
- public TcpClient client_soc;
- Client socket will be stores here. It will be used for any communication between the client and the server.
- public String name;
- Lab Computer name ( Ex : PC-1 ) will be stored here
- public DateTime last_time;
- Last time the image has been fetched. This is updated as soon as the Image has been fetched by the dedicated client thread running for the lab computer.
- public Mutex _lock;
- This is used to protect the data structure, if multiple people wants to fetch an image from the same client.
- public short node_mode;
- This is the mode bit, helps in synchronization between the Image Request from the Webpage and the client thread which is running to fetch an image from the lab computer.
- PhysicalAddress will store the clients MAC address. MAC address is sent in a message when it logs in to the system.
- Webserver - IIS Application Server
- TCPServer - Serverd ( daemon ) - Running as a thread in the IIS Application Server
- Client - LabComputer ( daemon )
- This application is made possible by the interaction between the IIS Application Server and the Serverd TCP server.
- When a user wants to monitor a computer, he opens the website which will request IIS Application Server for the webpage. This App server will inturn contact Serverd which is in the same process space and get the online lab computers who have logged into the system.
- The role of Serverd is to populate the online lab computer list, maintain threads for each of the lab computer.
- The threads created for each lab computer on the Serverd will be waiting for the request from the IIS Application Server, when the user logs in.
- Whenever a user wants to monitor a client, he will specify the name. This will trigger a AJAX event every 10 seconds to a page on the server. This page on the server will direct the request to the respective lab computer threads which are listening for requests. This thread will initiate the screenshot fetch and fetches it. After fecthing it adds to the respective ~/Images folder with MAC address as a name of the image.
- This image is set as the img tag of the user's output page and the page is updated.
- Client's entry should be removed from the system, if the client goes out of the system. This should be handled by the Heartbeat probes.
- Arithmetic Overflow Exception on receiving large images.
#####This will capture the screenshots of the lab systems and report it to the faculty on request. It can provide details about a computer like
- Processes currently running on a system
- Network Stats like IP, Subnet, etc
- Screenshot of the current state of the lab computer