Server Error in '/' Application.

URI formats are not supported.

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: URI formats are not supported.

Source Error:


Line 772:    public System.Drawing.Bitmap ResizeBitmapOnWhiteCanvas(string sourceFileName, System.Drawing.Size szTarget, bool Stretch)
Line 773:    {
Line 774:        System.Drawing.Bitmap bmpOriginal = new System.Drawing.Bitmap(sourceFileName);
Line 775:        System.Drawing.Bitmap result = new System.Drawing.Bitmap(szTarget.Width, szTarget.Height);
Line 776:        using (System.Drawing.Graphics g = System.Drawing.Graphics.FromImage((System.Drawing.Image)result))

Source File: c:\inetpub\wwwroot\oroart\App_Code\system_global_settings.cs    Line: 774

Stack Trace:


[ArgumentException: URI formats are not supported.]
   System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths) +14554096
   System.IO.Path.GetFullPathInternal(String path) +139
   System.IO.Path.GetFullPath(String path) +11
   System.Drawing.IntSecurity.UnsafeGetFullPath(String fileName) +110
   System.Drawing.IntSecurity.DemandReadFileIO(String fileName) +43
   System.Drawing.Bitmap..ctor(String filename) +47
   gen_func.ResizeBitmapOnWhiteCanvas(String sourceFileName, Size szTarget, Boolean Stretch) in c:\inetpub\wwwroot\oroart\App_Code\system_global_settings.cs:774
   ASP.thumbnailer_squareimg2_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in c:\inetpub\wwwroot\oroart\thumbnailer\squareImg2.aspx:22
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +276
   System.Web.UI.Page.Render(HtmlTextWriter writer) +40
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +80
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4239


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