i have try to save captured image into binary format. The image is captured by webcam and image getting from another page on image control. i want to save this image into binary format in database.
my tried code is below.
but i'm getting below error in FileStream line 02.....
- Additional information: Access to the path 'K:\StudentManagment\StudentManagment' is denied.
my tried code is below.
- string filepath = Server.MapPath(vImage.ImageUrl);
- FileStream fs = new FileStream(filepath, FileMode.OpenOrCreate, FileAccess.ReadWrite);
- BinaryReader br = new BinaryReader(fs);
- Byte[] bytes = br.ReadBytes((Int32)fs.Length);
- br.Close();
- fs.Close();