1

I am working on window application, I am using system.window.forms.picturebox control. From window Application I am able to save image in local drive through

pbFingerprint.Image.Save("E:\\ProfileImage\\" + l_FileName);

but when I tried to save into my web server I am getting exception

pbFingerprint.Image.Save("http://www.uploadprofilepic.com//profilePic//" + l_FileName);

Exception:- URI formats are not supported.

ANJYR
  • 2,583
  • 6
  • 39
  • 60
  • I am not sure this issue related to `Save` of `PictureBox`. What happens when you run a simple copy command in CMD: `> copy test.txt http:/www.uploadprofilepic.com/profilePic/test.txt`? – elirandav Feb 18 '17 at 09:00
  • You can save the file locally and then use `Server.MapPath' to save it on your server. See example: [link](http://stackoverflow.com/questions/1268766/writing-file-to-web-server-asp-net). – elirandav Feb 18 '17 at 09:24
  • 1
    You can't save files like that, that is not how the http protocol works and it is beyond the design boundaries of the System.IO.File classes. You either need to run an ftp server or ssh server on your webserver and then use the matching protocol to transfer files OR create a webform on your website that accepts a fileinput. Your client can then to a UploadFile() from the webclient. – rene Feb 18 '17 at 09:33

0 Answers0