Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 849691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T07:08:38+00:00 2026-05-15T07:08:38+00:00

A generic error occurred in GDI+ [ExternalException (0x80004005): A generic error occurred in GDI+.]

  • 0

A generic error occurred in GDI+

[ExternalException (0x80004005): A generic error occurred in GDI+.]
System.Drawing.Image.Save(Stream stream, ImageCodecInfo encoder, EncoderParameters encoderParams) +615257

I have a webpage in which a pdf is converted to png, and using the response.outputstream
it is displayed. when i run this on my local machine is works fine. but when i run the same code on server is throws this exception.

my question is , where i could look in for error. as there is no inner exception or any other information provided. only clue is that it’s happening on Image.Save , but the same code works perfectly fine on my local machine , then y is it not working on production???

http://blog.maartenballiauw.be/post/2008/05/13/ASPNET-MVC-custom-ActionResult.aspx

this is the example i am following

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T07:08:39+00:00Added an answer on May 15, 2026 at 7:08 am

    I changed my Image over load method to

    Image.Save(context.HttpContext.Response.OutputStream, ImageCodecInfo encoder, EncoderParameters encoderParams)

    earlier i was using Image.Save(context.HttpContext.Response.OutputStream,ImageFormat)

    after changing the overload method for save , it fixed the error.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i get an A generic error occurred in GDI+ exception when I call img.Save(path,
When I call Bitmap.Save function, this error occurs: A generic error occurred in GDI+.
I am getting the error Generic error occurred in GDI+ in my sample code
I'm loading a file: System.Drawing.Image img = System.Drawing.Image.FromFile(FilePath); Now I would like to save
I'm trying to resave an image and am getting the error A generic error
I'm receiving this error in my Linq statement --- Cannot implicitly convert type 'System.Collections.Generic.IEnumerable'
So here is the error... An error occurred while saving the Panel. System.ArgumentOutOfRangeException: Index
I am creating a generic error handling / logging class for our applications. The
UPDATE: To clarify a generic error catcher that catches 404's doesn't have enough granularity
I am using a generic error page using ASP.NET's <customErrors> directive. <customErrors mode=On defaultRedirect=500.html

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.