I am using WCF service in my application.All services are hosted as window service. I have one virtual directory in IIS to save user file (may be PDF or TXT). I want to create a particular folder for each user and keep their information file in that folder. How can I create a folder and upload file to IIS via WCF?
For example: the virtual directory path is http://10.10.10.1/TempUserFolder/
I want to create a folder for UserID = 1 like http://10.10.10.1/TempFolder/UserID1/.
And then save his information file to that folder, http://10.10.10.1/TempFolder/UserID1/Info.pdf.
I got a error message URI formats are not supported when I use System.IO. Please guide me in right way. I really appreciate your help. I am using VS200
If your windows service is on same IIS host server, you can very well use absolute path, say if http://10.10.10.1/TempFolder/ maps to c:/TempFolder/, in WCF windowsservice when recieving file create new folder in c:/TempFolder/ and store file there, and if its on different machine you can create network share and then create folder and copy files to that location.
You can find many article on web to demonstrate how to upload file via wcf
http://stefanoricciardi.com/2009/08/28/file-transfer-with-wcp/