[Solved-2 Solutions] A generic error occurred in GDI+, JPEG Image to MemoryStream
We get this error:
- If we resize the image and as part of that method we return the resized object as follows. we have to insert two calls to the above method and a direct save to a file.
- If you are getting that error , then I can say that your application doesn't have a write permission on some directory.
- For example, if you are trying to save the Image from the memory stream to the file system , you may get that error.
- If you are using XP, make sure to add write permission for the aspnet account on that folder.
- If you are using windows server (2003,2008) or Vista, make sure that add write permission for the Network service account.