I am trying to use swfupload to upload file to the server. The photo upload worked perfectly fine on the development machine but when i tried to check it on production server. there was 500 internal server error
. Checking the exception details the
`Stack trace: at System.Drawing.Image.Save(String filename, ImageCodecInfo encoder, EncoderParameters encoderParams)
at System.Drawing.Image.Save(String filename, ImageFormat format)
at ImageryDataAccess.SaveFullSizeImage(Byte[] ImageData)
at ImageryDataAccess.SaveUserImage(Byte[] ImageData, Guid UserId)
at Photos.Page_Load(Object sender, EventArgs e)
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) `
showed this details. I checked the function save fullsizeimage
there seemed to be only one suspect and that was
string fileName=ImageName.ToString() + ".JPEG";
string App_datapath = HttpContext.Current.Server.MapPath("~/App_Data/setP");
bmp.Save(App_datapath+"/" +fileName, System.Drawing.Imaging.ImageFormat.Jpeg);
This code works fine on dev server but not on production. What I am not sure what I am going wrong here. /
is my only guess to be something a problem because the microsoft use\
for directory paths. but again why then it would work on dev server. If any one can resolve the issue..