as me was blocked on the same issue from last 3-4 days n tried a lot of different attempts for the same but not a single one turned out to be successful.
But finally today i got the solution.
After making it double sure that all the permissions are set to WRITE.
USE string filepath = Server.MapPath("./Images/");
instead of
string filepath = Server.MapPath("~//Images//");
the main issue was while mapping a virtual path
it starts the path from site folder
so we need to map with "." instead of "~"
I have tried the same solution on 3 different projects for the same problem.
all of them started working very smoothly.
All the best..... :)
Please mark this as "ANSWER" if this helps u.
-------------------
Rohit Mahadik
venkatu2005
All-Star
32487 Points
6742 Posts
Re: Error in saving Image-A generic error occurred in GDI+.
Oct 13, 2008 06:22 AM|LINK
Hi
I got the same error on this line
newBmp.Save(Server.MapPath(filePath), Imaging.ImageFormat.Png)
let anyone give solution it works locally fine but , when i work it on live
it shows generic error??
Thanks.
rohitmahadik
Member
586 Points
123 Posts
Re: Error in saving Image-A generic error occurred in GDI+.
Jul 08, 2010 10:21 AM|LINK
Hello Friends,
as me was blocked on the same issue from last 3-4 days n tried a lot of different attempts for the same but not a single one turned out to be successful.
But finally today i got the solution.
After making it double sure that all the permissions are set to WRITE.
USE string filepath = Server.MapPath("./Images/");
instead of
string filepath = Server.MapPath("~//Images//");
the main issue was while mapping a virtual path
it starts the path from site folder
so we need to map with "." instead of "~"
I have tried the same solution on 3 different projects for the same problem.
all of them started working very smoothly.
All the best..... :)
-------------------
Rohit Mahadik
venkatu2005
All-Star
32487 Points
6742 Posts
Re: Error in saving Image-A generic error occurred in GDI+.
Jul 12, 2010 04:32 AM|LINK
Yes it should be ~ it will resolve the url.. of the image from the images folder..
Thanks.
anujtripathi
Contributor
3759 Points
595 Posts
Re: Error in saving Image-A generic error occurred in GDI+.
Jul 26, 2010 11:03 AM|LINK
Hi jeenajos,
Please check the link below regarding the issue which you illustrate:
A generic error occured in GDI+
Hope this will help you.
Thanks
Please remember to click “Mark as Answer” on the post that helps you, it will help other(s) to get there answer.
rohitmahadik
Member
586 Points
123 Posts
Re: Error in saving Image-A generic error occurred in GDI+.
Jul 26, 2010 11:41 AM|LINK
Anju,
Nice ellaborated answer. really too much helpful....
Thanks
-------------------
Rohit Mahadik