Server Error in '/' Application.

Parameter is not valid.

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.ArgumentException: Parameter is not valid.

Source Error:


Line 510:    protected Bitmap ResizeBitmap(Bitmap oImage, int nWidth, int nHeight)
Line 511:    {
Line 512:        Bitmap oThumbnail = new Bitmap(nWidth, nHeight);
Line 513:
Line 514:        // Get a Graphics Object from the Image

Source File: g:\pleskvhosts\deanlunzfake.com\httpdocs\createdbyx\User controls\Gallery.ascx.cs    Line: 512

Stack Trace:


[ArgumentException: Parameter is not valid.]
   System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format) +1164726
   System.Drawing.Bitmap..ctor(Int32 width, Int32 height) +19
   Gallery.ResizeBitmap(Bitmap oImage, Int32 nWidth, Int32 nHeight) in g:\pleskvhosts\deanlunzfake.com\httpdocs\createdbyx\User controls\Gallery.ascx.cs:512
   Gallery.Page_Load(Object sender, EventArgs e) in g:\pleskvhosts\deanlunzfake.com\httpdocs\createdbyx\User controls\Gallery.ascx.cs:464
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +52
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Control.LoadRecursive() +134
   System.Web.UI.Control.LoadRecursive() +134
   System.Web.UI.Control.LoadRecursive() +134
   System.Web.UI.Control.LoadRecursive() +134
   System.Web.UI.Control.LoadRecursive() +134
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4700.0