Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,
I need some pointers, I'm need to create an C# app that will WATCH a folder in a PC and insert the new files to a MySQL database in a remote webserver, the tricky part is that I need the C# app to allow the user in the PC to access these files in the local folder from the Web server so they can open them, and we are not talking about just transferring the file to the webserver, just open it directly from the local folder, and keeping in mind that the local PC is behind a router, all normal ports are closed, so it will need to be like a peer-to-peer connection I think, but the "client" peer is not a PC is a website running on PHP, IIS should not be required, but we can create services in Windows if they are needed.

This C# app will be running in the system try all the time.

Is this possible to create?, I've seen apps that can do similar things, but don't know what is required.

Thanks in advance.
Posted
Updated 5-Feb-14 4:41am
v4

1 solution

The web server will not have access to the filesystem on the client PC's. Web PAGES sent to the client browser MAY have access to the files, but only if the security settings on the browsers are set as low as possible. This is not a situation you would find in any corporate environment.

In order to make something like this work, each client machine will need to be both a client to other PC's and a web server for other clients to connect to it. No matter what, either the required ports are opened up, or you can't do peer-to-peer. Which ports must be opened depends on the ports you use in your code.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900