Server Error in '/' Application.

Cannot use a leading .. to exit above the top directory.

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.Web.HttpException: Cannot use a leading .. to exit above the top directory.

Source Error:


Line 247:void DoClearOldBarcodes()
Line 248:{
Line 249:	string sPath = Server.MapPath("../i/barcode");
Line 250:	FileInfo[] af = new DirectoryInfo(sPath).GetFiles("*.gif");
Line 251:	foreach (FileInfo fi in af)

Source File: d:\html\webhost\yellowprice\site.cs    Line: 249

Stack Trace:


[HttpException (0x80004005): Cannot use a leading .. to exit above the top directory.]
   System.Web.Util.UrlPath.ReduceVirtualPath(String path) +11383337
   System.Web.Util.UrlPath.Reduce(String path) +64
   System.Web.VirtualPath.Combine(VirtualPath relativePath) +152
   System.Web.HttpRequest.MapPath(VirtualPath virtualPath, VirtualPath baseVirtualDir, Boolean allowCrossAppMapping) +204
   System.Web.HttpServerUtility.MapPath(String path) +117
   ASP.listing_aspx.DoClearOldBarcodes() in d:\html\webhost\yellowprice\site.cs:249
   ASP.listing_aspx.CheckDailyTasks() in d:\html\webhost\yellowprice\site.cs:245
   ASP.listing_aspx.TS_Init() in d:\html\webhost\yellowprice\site.cs:61
   ASP.listing_aspx.TS_PageLoad() in d:\html\webhost\yellowprice\site.cs:126
   ASP.listing_aspx.Page_Load(Object Src, EventArgs E) in d:\html\webhost\yellowprice\cs\listing.cs:15
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +42
   System.Web.UI.Control.OnLoad(EventArgs e) +132
   System.Web.UI.Control.LoadRecursive() +66
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428


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