I am working on a project in it I want to capture an image and save it to a server. When I run the application on localhost it works, but on the server it doesn't.
My code:
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();
}
 
     
    