friendly urls causes double page enter
<p>I'm trying to make a friendly url following the instructions on this page: <a href="http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx" rel="nofollow">TipTrickURL</a>,
in order to change <code>www.samplepage.com/Default.aspx?Category=Desserts&amp;Page=4</code> into <b><code>www.samplepage.com/Default.aspx/Desserts/Page4</code></b>. It works however, every time I enter the friendly URL, it enters the page twice. I couldn't say it is a postback, since it enters on the validation <code>if(!IsPostBack)</code> and it happens on each page i tried, complex pages and text only pages. </p>

<p>How can I prevent this double page entry? </p>

<p>ASPX code</p>

<pre><code>    &lt;%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ResultPool.aspx.cs" Inherits="Drawit.ResultPool" %&gt;
&lt;asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server"&gt;
    &lt;link href="Content/Site.css" rel="stylesheet" /&gt;
&lt;/asp:Content&gt;
&lt;asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server"&gt;
&lt;/asp:Content&gt;
&lt;asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server"&gt;
    &lt;ul&gt;
        &lt;li class="labelForm"&gt;&lt;asp:Label ID="lblResult" runat="server" Text=""&gt;&lt;/asp:Label&gt;&lt;/li&gt;
        &lt;li class="labelForm"&gt;&lt;asp:Label ID="lblOriginal" runat="server" Text=""&gt;&lt;/asp:Label&gt;&lt;/li&gt;

        &lt;li class="labelForm"&gt;&lt;asp:Button ID="btnHome" runat="server" Text="Button" OnClick="btnHome_Click" /&gt;&lt;/li&gt;
    &lt;/ul&gt;
&lt;/asp:Content&gt;
</code></pre>

<p>.CS code</p>

<p>public partial class ResultPool : System.Web.UI.Page
{</p>

<pre><code>protected void Page_Load(object sender, EventArgs e)
{
    string Mensaje = "El proceso de ";
    string RutaArchivo = "~/Images/Results/";
    if (!IsPostBack)
    {
        try
        {
            string stats;
            if (Request.PathInfo.Length &gt; 0)
                stats = Request.PathInfo.Substring(1);
            else
                stats = "Error";

            string[] result = stats.Split('/');
            stats = result[0];

            switch (stats)
            {
                case "OK":
                    {
                        Mensaje += result[1] + " ha finalizado con exito!";
                        break;
                    }
                case "NO":
                    {
                        Mensaje += result[1] + " ha tenido un error y no pudo finalizar!";
                        break;
                    }
                case "Error":
                    {
                        Mensaje = "Ha ocurrido un error. Por favor intente mas tarde.";
                        break;
                    }
                default:
                    {
                        Mensaje = "Ha ocurrido un error. Por favor intente mas tarde.";
                        break;
                    }
            }
            lblResult.Text = Mensaje;
        }
        catch (Exception)
        {
            lblResult.Text = "There was an error!";
        }

    }
}
</code></pre>
