Server Error in '/' Application.

Could not find file 'D:\Umbraco Sites\resources.thomsonreuters.com.au\wwwroot\media\1029\august1.png'.

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.FileNotFoundException: Could not find file 'D:\Umbraco Sites\resources.thomsonreuters.com.au\wwwroot\media\1029\august1.png'.

Source Error:


Line 35: 		foreach (var img in images)
Line 36: 		{
Line 37: 			img.Attributes["src"].Value = "data:image/gif;base64," + Convert.ToBase64String(System.IO.File.ReadAllBytes(Server.MapPath(img.Attributes["src"].Value.Split(new char[] { '?' })[0])));
Line 38: 		}
Line 39: 	}

Source File: d:\Umbraco Sites\resources.thomsonreuters.com.au\wwwroot\Views\Partials\Sidebar.cshtml    Line: 37

Stack Trace:


[FileNotFoundException: Could not find file 'D:\Umbraco Sites\resources.thomsonreuters.com.au\wwwroot\media\1029\august1.png'.]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +1344
   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) +1217
   System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) +144
   System.IO.File.InternalReadAllBytes(String path, Boolean checkHost) +122
   ASP.<>c__DisplayClass1.<RenderText>b__0(TextWriter __razor_helper_writer) in d:\Umbraco Sites\resources.thomsonreuters.com.au\wwwroot\Views\Partials\Sidebar.cshtml:37
   System.Web.WebPages.WebPageBase.Write(HelperResult result) +108
   ASP._Page_Views_Partials_Sidebar_cshtml.Execute() in d:\Umbraco Sites\resources.thomsonreuters.com.au\wwwroot\Views\Partials\Sidebar.cshtml:16
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +252
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +147
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +122
   Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer) +194
   System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData) +136
   ASP._Page_Views_OnePassProduct2ColumnFooter_cshtml.Execute() in d:\Umbraco Sites\resources.thomsonreuters.com.au\wwwroot\Views\OnePassProduct2ColumnFooter.cshtml:41
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +252
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +147
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +107
   Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer) +194
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +375
   System.Web.Mvc.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17() +31
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +436
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +436
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +658
   System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__19() +39
   System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +25
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +52
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +25
   System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +38
   System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +41
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +25
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +38
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +602
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +195
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +128


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