Hello friends,
I am working on a project in it I want to capture image and save it on server machine. When I run application on localhost it's work but on server site it can't.
Can any one help me...
Thank you
For converting into image I write this code...
C#
void CreatePhoto() { string strPhoto = Request.Form["imageData"]; //Get the image from flash file byte[] photo = Convert.FromBase64String(strPhoto); FileStream fs = new FileStream(Server.MapPath("Images/Webcam.jpg"), FileMode.OpenOrCreate, FileAccess.Write); BinaryWriter br = new BinaryWriter(fs); br.Write(photo); br.Flush(); br.Close(); fs.Close(); }
Kunal VaishyaRank #990 · 2K reputationPosted Aug 20, 2013, 11:19 PM EDT
Image directory is there or not if yes then check full read write rights set or not.
Iftikar HussainRank #423 · 5.9K reputationPosted Aug 20, 2013, 11:51 PM EDT
In the server you need to have Images folder with read and write access inside your application folder
Regards,
Iftikar
Ring ZhongRank #6,843 · 255 reputationPosted Aug 20, 2013, 11:58 PM EDT
Sumit Ghule26 reputationPosted Aug 21, 2013, 12:30 AM EDT
Sumit Ghule26 reputationPosted Aug 21, 2013, 12:32 AM EDT
Iftikar HussainRank #423 · 5.9K reputationPosted Aug 21, 2013, 1:13 AM EDT
Regards,
Iftikar