Web developers wiki ASP.NET Sitecore Sharepoint Kentico by Evident Interactive

In de logfile of a Sitecore 6 website you may see many occurrences of the following error:

7476 15:57:34 ERROR Application error.
Exception: System.Web.HttpUnhandledException
Message: Exception of type 'System.Web.HttpUnhandledException' was thrown.
Source: System.Web
   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.layouts_hu_int_base_aspx.ProcessRequest(HttpContext context)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Nested Exception

Exception: System.Web.HttpException
Message: Cannot use a leading .. to exit above the top directory.
Source: System.Web
   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.Adapters.ControlAdapter.Render(HtmlTextWriter writer)
   at Sitecore.Web.FormAdapter.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.HtmlControls.HtmlForm.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)

It is remarkable that this error usually only appears on a production servers and never on development and test servers. Furthermore, this error seems to be specific for Sitecore 6 and does not occur in previous versions of Sitecore.

It is not really clear what is causing this. But fortunately the solution is simple: in web.config just add the attribute cookieless with the value “UseCookies” to the tag. Or in other words, in web.config replace

	<authentication mode="Forms">
		<forms name=".ASPXAUTH"/>
	</authentication>

by this

	<authentication mode="Forms">
		<forms name=".ASPXAUTH" cookieless="UseCookies"/>
	</authentication>

This adjustment does not change the behavior of your Sitecore website in any way, but the error will disappear.

According to the (not-Sitecore specific) blog posting this error may occur when GoogleBot visits your website. This may be true, but sofar we haven’t been able to prove it.

 © Evident Interactive BV