Server Error in '/' Application.

Could not find a part of the path 'C:\home\site\wwwroot\Content\temp\2e3a56af-18a9-47e0-9925-2107bad4ca69.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:\home\site\wwwroot\Content\temp\2e3a56af-18a9-47e0-9925-2107bad4ca69.jpg'.

Source Error:


Line 52:                     <p>
Line 53:                         <label for="preventspam">
Line 54:                           <% var text = TravelTours.Helpers.TextConverter.TextToImage(HttpContext.Current.Session["a"] + " + " + HttpContext.Current.Session["b"] + " =", "captcha.gif"); %>
Line 55:                           *Please Answer: <img alt="Image" id="img1" src="<%= text %>" />
Line 56:                         </label>

Source File: C:\home\site\wwwroot\Views\Home\Contact.aspx    Line: 54

Stack Trace:


[DirectoryNotFoundException: Could not find a part of the path 'C:\home\site\wwwroot\Content\temp\2e3a56af-18a9-47e0-9925-2107bad4ca69.jpg'.]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +373
   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) +738
   System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy) +62
   System.IO.FileStream..ctor(String path, FileMode mode) +57
   TravelTours.Helpers.TextConverter.TextToImage(String textToAdd, String imageToUse) +228
   ASP.views_home_contact_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in C:\home\site\wwwroot\Views\Home\Contact.aspx:54
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +270
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +14
   System.Web.Mvc.ViewPage.Render(HtmlTextWriter writer) +54
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +67
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +101
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +27
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1342


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