Server Error in '/' Application.

Could not find file 'c:\deployments\prod\www.spazioesclusivo.com\App_Data\images\foto0.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.FileNotFoundException: Could not find file 'c:\deployments\prod\www.spazioesclusivo.com\App_Data\images\foto0.jpg'.

Source Error:


Line 29:             string path = AppDomain.CurrentDomain.BaseDirectory + "App_Data\\images\\foto" + id + ".jpg";
Line 30: 
Line 31:             System.Drawing.Image i = System.Drawing.Image.FromStream(new MemoryStream(File.ReadAllBytes(path)));
Line 32: 
Line 33:             string[] dims = context.Request.QueryString["dim"].Split(new char[] { 'x' });

Source File: c:\deployments\prod\www.spazioesclusivo.com\dynimages\searchImage.ashx    Line: 31

Stack Trace:


[FileNotFoundException: Could not find file 'c:\deployments\prod\www.spazioesclusivo.com\App_Data\images\foto0.jpg'.]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +305
   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) +1162
   System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) +66
   System.IO.File.ReadAllBytes(String path) +58
   SearchImage.ProcessRequest(HttpContext context) in c:\deployments\prod\www.spazioesclusivo.com\dynimages\searchImage.ashx:31
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75


Version Information: Microsoft .NET Framework Version:2.0.50727.8974; ASP.NET Version:2.0.50727.8974