+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Pages loading without extensions - causing Ajax errors

Pages loading without extensions - causing Ajax errors

9 posts, 0 answered
  1. Mike
    Mike avatar
    221 posts
    Registered:
    19 Aug 2008
    23 Mar 2009
    Link to this post
    Morning,

    We in the final stages of development of out Sitefinity website. we launching in a week and a half. We have been hitting the site hard with testing of all kinda with the intension of breaking the site (as users usually do) and correcting the issues.

    We just discovered an issue that i would like some explanation on. First let me say that i have not (intentionally) setup extensionless pages...

    Here is the problem...

    When we enter the site it redirect the user to the home page of the site whihc is http://www.mydomain.com/Home.aspx

    Ont his page we have some Ajax forms that perform certain actions, in this case a response.redirect to another page.

    this action would occasionally produce the following error:

    Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to response.Write(), response filters, HttpModules, or server trace is enabled. Details: Error parsed near ' <!DOCTYPE html P'.

    We discovered that our pages can be accessed WITHOUT an extension: http://www.mydomain.com/Home and when this was done these error would be produced.

    Now i have checked the server and we have not setup any extension in IIS other that .template (no .* extesion is setup in IIS)

    Is there somethign i am missing that would prevent a user from accessing our pages in this way?

    Duncan
  2. Vlad
    Vlad avatar
    498 posts
    Registered:
    15 Jul 2016
    24 Mar 2009
    Link to this post
    Hi Duncan,

    As for the error:

    Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to response.Write(), response filters, HttpModules, or server trace is enabled. Details: Error parsed near ' <!DOCTYPE html P'.

    We have no idea about it. You mentioned that it is thrown occasionally, but yet, are you able to provide some basic steps to reproduce it? We did a quick search for this error, but didn't find anything related to the Sitefinity.

    As for accessing the CMS pages without extensions, yes, currently it is allowed by the CmsHttpModule. Actually, this filter is left for the higher level, i.e. IIS mappings. However, this setting are not applicable to the IIS 7 with intergrated pipeline mode, where all requests are handled by the ASP.NET application. Is this your case? Please look at the article: http://learn.iis.net/page.aspx/508/wildcard-script-mapping-and-iis-7-integrated-pipeline/

    Maybe you are right, we should consider an option to deny extensionless URLs in the CmsHttpModule. We will discuss it for the next release.

    In the meantime, you can use on of the following approaches:
     - Switch the IIS 7 mode to classic;
     - Create an HttpModule, which redirects the extensionless URLs, and place it on the top of the http modules collection.

    Greetings,
    Vlad
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  3. Mike
    Mike avatar
    221 posts
    Registered:
    19 Aug 2008
    24 Mar 2009
    Link to this post
    Hi there Vlad,

    I thought i did provide the steps we discovered regarding reproducing the error... It happens only when the page is accessed WITHOUT an extension.

    Let me clarify this... It happen consistently/always when accessing the page without and extension and NEVER when accessing the page with an extension.

    Why? I have no idea... I was hoping someone would be able to tell me that.

    For now we are ignoring the error as we are hoping no user will ever access any of our pages without the extension.

    Duncan
  4. Vlad
    Vlad avatar
    498 posts
    Registered:
    15 Jul 2016
    25 Mar 2009
    Link to this post
    Hi Duncan,

    Thank you for the additional information. However, could you please tell us what are the exact controls placed on the page? (You just wrote "some Ajax forms").

    All the best,
    Vlad
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  5. Mike
    Mike avatar
    221 posts
    Registered:
    19 Aug 2008
    25 Mar 2009
    Link to this post
    If we open a private ticket for the issue i will provide you with a link to our demo site where you can see the behavior in action...

    The control has a RadAjaxPanel and a RadioButtonList control... The RadioButtonList fires off a OnSelectedIndexChanged event which does a Response.Redirect() to another page.

    Essentially something like this:

    <rad:radajaxpanel id="RadAjaxPanel1" runat="server" loadingpanelid="LoadingPanel1"
     
    <asp:RadioButtonList ID="rdoSelectSearchType" OnSelectedIndexChanged="rdoSelectSearchType_SelectedIndexChanged" AutoPostBack="true" runat="server"
        <asp:ListItem Text="Option 1" Value="0" Selected="true" /> 
        <asp:ListItem Text="Option 2" Value="1" /> 
        <asp:ListItem Text="Option 3" Value="2" /> 
    </asp:RadioButtonListOverride> 
     
    </rad:radajaxpanel> 
    <rad:radajaxloadingpanel id="LoadingPanel1" runat="server" skinid="sknRadAjaxLoadingPanel"
        <asp:Image ID="imgLoading" SkinID="sknLoading" runat="server" Style="margin-top: 180px;" /> 
    </rad:radajaxloadingpanel> 

    protected void rdoSelectSearchType_SelectedIndexChanged(object sender, EventArgs e) 
        if (rdoSelectSearchType.SelectedValue != "0"
        { 
            switch (rdoSelectSearchType.SelectedValue) 
            { 
                case "1"
     
                    Response.Redirect("~/somepage/pagename.aspx"); 
     
                    break
                case "2"
     
                    Response.Redirect("~/somepage/pagename.aspx"); 
     
                    break
            } 
        } 

    As mentioned before when the page is accessed without and extension the error is produced on this event... When i has an extension the error is not produced.

    Duncan
  6. Vlad
    Vlad avatar
    498 posts
    Registered:
    15 Jul 2016
    30 Mar 2009
    Link to this post
    Hello Duncan,

    Unfortunately, we cannot reproduce the error using the provided code. But we noticed, that a different implementation of the RadioButtonList is used there (RadioButtonListOverride).
    Have you tried to isolate the problem, by using just this control and everything else by default?
    Also, can you give us a link to your demo site, so we could see this behavior?

    Kind regards,
    Vlad
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  7. Mike
    Mike avatar
    221 posts
    Registered:
    19 Aug 2008
    07 Apr 2009
    Link to this post
    So now that my website is live, you can see this behavior first hand:

    This is my home page as it normally is accessed:
    http://www.perfectfamilyvacation.com/Home.aspx

    Click the "Search Resorts" button results in a post to the next page that displays results of your search.

    Do the same thing, but access the page without the extension:
    http://www.perfectfamilyvacation.com/Home

    This results in a AJAX error.

    Duncan

  8. Mike
    Mike avatar
    221 posts
    Registered:
    19 Aug 2008
    07 Apr 2009
    Link to this post
    Oh and btw... this is true for any page of mine that performs this sort of action. Even pages WITHOUT the RadioButtonListOverride control:

    Example:

    http://www.perfectfamilyvacation.com/Resorts.aspx
    http://www.perfectfamilyvacation.com/Resorts

    Duncan
  9. Vlad
    Vlad avatar
    498 posts
    Registered:
    15 Jul 2016
    09 Apr 2009
    Link to this post
    Hello Duncan,

    Yes, seems the problem has nothing to do with the RadioButtonListOverride control. However, we are still not able to reproduce it locally.
    Is it possible that it is related to something else?
    Can you create a clear Sitefinity project, create a page and add the mentioned control in it? Let us know if you get the same error.

    Greetings,
    Vlad
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Register for webinar
9 posts, 0 answered