Transfer file(s) to a folder on a server
I have 开发者_JS百科been trying to come up with a strategy that will allow me to transfer a file over a network (or internet in near future) from a client to a server's folder (DB server, in my case). I already have a Client-Server application running. Several clients connect to a server and perform their tasks. The server has the SQL Server 2008 DB as well. I do not want to upload file to database. I know that using credentials and/or impersonation, one can transfer a file using the System.IO library to a network-shared folder. Now, my client is on a company Intranet. Therefore, all communication is over local network and no internet is involved. Nevertheless, there is a prospect of involving a WP7 client applet as well. If that were the case, eventually the client will want to use the system over internet as well. For all other communication, I will have to expose the SQL server over the internet by getting a fixed/static IP address.
The only thing that bothers me is file transfer. The users constantly upload CVs, legal documents (all in PDF only) to a folder on the server. They also retrieve it to view them. I was wondering if there is a possibility to involve socket programming and the socket-server portion is in a windows service running on the server.
Is that a viable approach? Several users will be uploading and retrieving at the same time.
Kindly share your experience in this case.
精彩评论