Server Error in '/' Application.

Could not find a part of the path 'M:\web\users\v016u31mis\html\Meditravel2017\Files\Mezzi\7'.

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 'M:\web\users\v016u31mis\html\Meditravel2017\Files\Mezzi\7'.

Source Error:


Line 97:         Path = ConfigurationManager.AppSettings("PathFiles").ToString() + "Mezzi\" + Dir + "\"
Line 98:         Pathrel = "/Files/Mezzi/" + Dir + "/"
Line 99:         For Each s In Directory.GetFiles(Path, "*.jpg")
Line 100:            s = s.Substring(s.LastIndexOf("\") + 1)
Line 101:            Dim bmp As New Bitmap(Path + s)

Source File: M:\web\users\v016u31mis\html\Meditravel2017\IT\Scheda.aspx.vb    Line: 99

Stack Trace:


[DirectoryNotFoundException: Could not find a part of the path 'M:\web\users\v016u31mis\html\Meditravel2017\Files\Mezzi\7'.]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +281
   System.IO.FileSystemEnumerableIterator`1.CommonInit() +421
   System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost) +515
   System.IO.Directory.GetFiles(String path, String searchPattern) +109
   IT_Scheda.ValutaFoto(String Dir) in M:\web\users\v016u31mis\html\Meditravel2017\IT\Scheda.aspx.vb:99
   IT_Scheda.IT_Default_Load(Object sender, EventArgs e) in M:\web\users\v016u31mis\html\Meditravel2017\IT\Scheda.aspx.vb:62
   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