画像をキャプチャしてサーバーに保存したいプロジェクトに取り組んでいます。localhost でアプリケーションを実行すると動作しますが、サーバーでは動作しません。
私のコード:
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();
}