error saving graphic, permissions?

Discussion in 'ASP.NET / ASP.NET Core' started by petro426, Jan 14, 2004.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hello.

    The following command:

    b.Save("testimage.gif", ImageFormat.gif)

    works on my PC, but does't work when I try to run it on my website at Discount ASP.net. It generates the following error:
    ---------------------------------------
    A generic error occurred in GDI+.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+.
    ---------------------------------------

    I'm assuming this is a permissions thing? The 'anonymous' user has read & write access allowed in the directory this file should be save to. Has anybody else run into this issue & found a solution?

    Thanks,
    Rich
     
  2. Using the img src="*.aspx".

    All set.

    Thanks for looking,
    R
     
  3. Try b.Save(Path.Combine(Server.MapPath("MyWebApplicationDirectory"), "testimage.gif"), ImageFormat.gif)

    Keith Payne
    Technical Marketing Solutions
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page