string imagePath = HttpContext.Current.Server.MapPath("~/Resources/image.jpeg");
if (File.Exists(imagePath))
{
File.Delete(imagePath);
Debug.WriteLine("image path exists");
}
using (var imageStream = new MemoryStream(binData))
{
Bitmap image = new Bitmap(imageStream);
image.Save(imagePath, System.Drawing.Imaging.ImageFormat.Jpeg);
image.Dispose();
}
我收到System.IO.IOException
..无法访问该流程,因为它已在使用中