To avoid infamous: Exception of typeSystem.Web.HttpUnhandledException’ was thrown. Cannot use a leading .. to exit above the top directory.
Instead of improving search engine ranking, Url Rewriting can prevent crawlers from indexing any pages. ASP.NET 2.0 uses an adaptive rendering pattern to render html depending on user agents. When a bot visits the site, System.Web.UI.Html32TextWriter gets used to render the html and apparently this throws an exception when System.Web.Util.UrlPath.ReduceVirtualPath() gets called internally by the .NET framework when using Url Rewriting.
This method is used to solve the problems associated with this message. However, it appears that XhtmlTextWriter causes other unrelated problems, so the current solution is to use cookieless="UseCookies" in web.config so the cokieless feature that changes the URL is NEVER used.

Namespace: MonoSoftware.MonoX
Assembly: MonoX (in MonoX.dll) Version: 5.1.40.5065 (5.1.40.5065)

Syntax

C#
protected override HtmlTextWriter CreateHtmlTextWriter(
	TextWriter tw
)
Visual Basic
Protected Overrides Function CreateHtmlTextWriter ( 
	tw As TextWriter
) As HtmlTextWriter
Visual C++
protected:
virtual HtmlTextWriter^ CreateHtmlTextWriter(
	TextWriter^ tw
) override
F#
abstract CreateHtmlTextWriter : 
        tw : TextWriter -> HtmlTextWriter 
override CreateHtmlTextWriter : 
        tw : TextWriter -> HtmlTextWriter 

Parameters

tw
Type: System.IO..::..TextWriter
Text writer

Return Value

Type: HtmlTextWriter
Valid HtmlTextWriter

See Also