Server Error in '/' Application.

Could not find a part of the path 'c:\wp-content\uploads\2021\posts\DB series remote control relief valves.jpg'.

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.IO.DirectoryNotFoundException: Could not find a part of the path 'c:\wp-content\uploads\2021\posts\DB series remote control relief valves.jpg'.

Source Error:


Line 587:            //
Line 588:            
Line 589:            iTextSharp.text.Image jpg1 = iTextSharp.text.Image.GetInstance(guid);
Line 590:            jpg1.ScaleAbsolute(350f, 370f);
Line 591:            Chunk chunk = new Chunk("This is from chunk. ");

Source File: d:\hostingspaces\torkhydraulics.biz\torkhydraulics.com\getpdfPost.aspx.cs    Line: 589

Stack Trace:


[DirectoryNotFoundException: Could not find a part of the path 'c:\wp-content\uploads\2021\posts\DB series remote control relief valves.jpg'.]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +281
   System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) +1242
   System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy) +132
   System.Net.FileWebStream..ctor(FileWebRequest request, String path, FileMode mode, FileAccess access, FileShare sharing, Int32 length, Boolean async) +143
   System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri, FileAccess access, Boolean asyncHint) +124

[WebException: Could not find a part of the path 'c:\wp-content\uploads\2021\posts\DB series remote control relief valves.jpg'.]
   System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri, FileAccess access, Boolean asyncHint) +534
   System.Net.FileWebRequest.GetResponseCallback(Object state) +450

[WebException: Could not find a part of the path 'c:\wp-content\uploads\2021\posts\DB series remote control relief valves.jpg'.]
   System.Net.FileWebRequest.EndGetResponse(IAsyncResult asyncResult) +391
   iTextSharp.text.Image.GetInstance(Uri url, Boolean recoverFromImageError) +115
   iTextSharp.text.Image.GetInstance(String filename) +19
   getpdfPost.GeneratePDF(String name, String title, String guid, String cat, String tags, String des, String dt, String gt) in d:\hostingspaces\torkhydraulics.biz\torkhydraulics.com\getpdfPost.aspx.cs:589
   getpdfPost.Page_Load(Object sender, EventArgs e) in d:\hostingspaces\torkhydraulics.biz\torkhydraulics.com\getpdfPost.aspx.cs:149
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533


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