URL rewrite module incompatibility (solved)

4 posts, 0 answers
  1. Igor
    Igor avatar
    24 posts
    Member since:
    May 2013

    Posted 07 Feb 2014 Link to this post

    Hello, a new post just to share an issue I have solved and that gave me an headache.
    All RadEditor dialogs returned me the error
    "Cannot deserialize dialog parameters. Please refresh the editor page."

    The problem had nothing with encryption (as suggested in other threads).
    The problem was an incompatibility with a URL rewriting rule in web.config, a rule that is suggested on Microsoft MSDN.
    <!--Redirect HTML with query parameters to lowercase URLs-->
    <rule name="ForcePagesWithParametersLowercase" stopProcessing="false">
      <match url=".*[A-Z].*\.(aspx|htm|html)" ignoreCase="false" />
      <conditions>
        <add input="{QUERY_STRING}" pattern=".*[A-Z].*" />
      </conditions>
      <action type="Redirect" redirectType="Permanent" url="{ToLower:{R:0}}?{ToLower:{QUERY_STRING}}" appendQueryString="false" />
    </rule>


    The SEO rule forces a permanent redirect on lower case URLs... but it is also responsible of the RadEditor problem.
    What's the solution if you don't want to remove the rule?
    Change it with the following one
    <!--Redirect HTML with query parameters to lowercase URLs-->
    <rule name="ForcePagesWithParametersLowercase" stopProcessing="false">
      <match url=".*[A-Z].*\.(aspx|htm|html)" ignoreCase="false" />
      <conditions>
        <add input="{QUERY_STRING}" pattern=".*[A-Z].*" />
        <add input="{REQUEST_FILENAME}" pattern=".*Telerik\.Web\.UI\.DialogHandler.*" negate="true"/>
      </conditions>
      <action type="Redirect" redirectType="Permanent" url="{ToLower:{R:0}}?{ToLower:{QUERY_STRING}}" appendQueryString="false" />
    </rule>


  2. Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 07 Feb 2014 Link to this post

    Hi Igor,

    The information provided for your approach to resolve the issue is very helpful and we decided to include it in our online documentation. Thank you for sharing knowledge with the Telerik community. Such actions are highly appreciated and as a token of gratitude I am updating your Telerik points.

    Some more information for other interested on this matter:

    This issue is known when the application on a 64x OS. You can check this help article, in which is explained how to resolve the issue. 

    Additionally, when an URL rewriter module is used, you should modify the DialogHandler.aspx to DialogHandler.axd and set the RadEditor's DialogHandlerUrl property to "~/Telerik.Web.UI.DialogHandler.axd". You can find more information and another approaches on this matter in this KB article.

    Regards,
    Ianko
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Igor
    Igor avatar
    24 posts
    Member since:
    May 2013

    Posted 07 Feb 2014 in reply to Ianko Link to this post

    Thanks, but I already solved it in the easier way described above.
  5. Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 07 Feb 2014 Link to this post

    Hi Igor,

    I updated the information of my message after review second time your post. The provided approach is indeed very helpful and your Telerik points should be already updated for this.

    Continue being proactive among the Telerik community, such deeds will be always highly appreciated. 

    Regards,
    Ianko
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top