Technical support This forum is closed.
Version 1.x > Technical support > "Cannot use a leading .. to exit" error in log View modes: 
User avatar
Guest
norashlea - 9/30/2006 3:22:19 AM
   
"Cannot use a leading .. to exit" error in log
Hi,

Just wondering what this error is that I see occurring in the event log frequently. Checking the IP's where it has occurred, they are always those of the web crawlers (eg, crawl-66-249-66-202.googlebot.com, or egspd42212.ask.com).

Is there something I need to modify to prevent the error from occurring? (see exception details below)

System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.Web.HttpException: Cannot use a leading .. to exit above the top directory. at System.Web.Util.UrlPath.ReduceVirtualPath(String path) at System.Web.Util.UrlPath.Reduce(String path) at System.Web.Util.UrlPath.Combine(String appPath, String basepath, String relative) at System.Web.HttpResponse.ApplyAppPathModifier(String virtualPath) at System.Web.UI.HtmlControls.HtmlForm.GetActionAttribute() at System.Web.UI.HtmlControls.HtmlForm.RenderAttributes(HtmlTextWriter writer) at System.Web.UI.HtmlControls.HtmlControl.RenderBeginTag(HtmlTextWriter writer) at System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) at ASP.main_master.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in d:\bds\NCG\main.master:line 9 at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.Control.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.Page.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace --- at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.news_aspx.ProcessRequest(HttpContext context) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\a990665e\57e2da2f\App_Web_sw5pc22p.7.cs:line 0 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Thanks,
Sharon.

User avatar
Guest
admin - 10/10/2006 9:26:06 AM
   
Re: "Cannot use a leading .. to exit" error in log
Hi Sharon,

this is a general ASP.NET issue. Unfortunately, we are not aware of any solution for this.

Best Regards,

User avatar
Member
Member
trint99 - 2/1/2007 6:07:55 PM
   
Re: "Cannot use a leading .. to exit" error in log
I am facing this same issue and it is causing catastrophic failure. This issue MUST be resolved. By tracing the requests, it appears that this is happening most often when google crawls the site (which is happening fairly often because the site just went live).

Because of URL rewriting, a request made to a managed page with a long directory path is handled by Kentico and the actual path fed by IIS is only one or two directories deep. Here's an example from my site:

Page requested (Using friendly URLs):
http://www.altn.com/Products/MessagingSolutions/MDaemon/

Page fed by IIS:
http://www.altn.com/PageTemplates/TwoColumnNav.aspx?aliaspath=/Products/MessagingSolutions/MDaemon

Now, if I wanted to get to the root, judging by the friendly url, I would try "../../../"

But as far as IIS knows that would take you beyond the application root, which is caught as an exception.

I have searched throughout my code and my content and, other than the cmsdesk, I can not find any parent paths that would cause this error.

User avatar
Member
Member
trint99 - 2/1/2007 6:09:33 PM
   
Re: "Cannot use a leading .. to exit" error in log
Sorry. I always forget this part.

We're running 1.9.2579 Professional.

User avatar
Member
Member
v2visual - 4/3/2007 3:47:31 AM
   
RE:"Cannot use a leading .. to exit" error in log
I've had the same problem with a number of Kentico sites, I've just found this article..

http://todotnet.com/archive/0001/01/01/7472.aspx?Pending=true

I'm about to try it, looks like a good workaround for now.

User avatar
Certified Developer 8
Certified Developer 8
norashlea - 4/16/2007 3:22:49 AM
   
RE:"Cannot use a leading .. to exit" error in log
Did you have any success with this? If so, can you tell me what you did? I've got the same issue with quite a few sites.

User avatar
Member
Member
trint99 - 4/17/2007 10:58:03 PM
   
RE:"Cannot use a leading .. to exit" error in log
The issue is caused by a bug in the .NET 2.0 framework related to URL rewriting.

There seem to be two possible fixes, one simple but seems odd, the other very complex but makes more sense.

I have posted on the ASP.NET forums seeking guidance on which is the better fix. That post has links to both fixes.

My post:
http://forums.asp.net/1669811/ShowThread.aspx#1669811

The easy fix:
http://communityserver.org/forums/t/469081.aspx

The complex fix:
http://todotnet.com/archive/0001/01/01/7472.aspx

I am using the simple fix and waiting for a response to my post to see if it is the best solution.

User avatar
Certified Developer 8
Certified Developer 8
Norashlea - 4/18/2007 2:11:48 AM
   
RE:"Cannot use a leading .. to exit" error in log
Thanks for the links. Great info.

I'll watch your post for responses. Impact on SEO is definitely an issue for me too! And not keen on trying the complex fix.