IIS URL Rewrite

3 posts, 0 answers
  1. Saeid Kdaimati
    Saeid Kdaimati avatar
    48 posts
    Member since:
    May 2006

    Posted 24 Feb 2012 Link to this post

    HI,

    I installed URL Rewrite module on IIS 7. After I added DB provider and outbound rule, RAD controls stop working, for instance, menu is not opening.
    Underneath is copy of rewrite configuration section:
      
    <rewrite>
      <providers>
        <provider name="Theme" type="DbProvider, Microsoft.Web.Iis.Rewrite.Providers, Version=7.1.761.0, Culture=neutral, PublicKeyToken=0545b0627da60a5f">
          <settings>
            <add key="ConnectionString" value="Data Source=.;Initial Catalog=db;Integrated Security=false;uid=sa;password=pass" />
            <add key="StoredProcedure" value="UrlTheme" />
            <add key="CacheMinutesInterval" value="10" />
          </settings>
        </provider>
      </providers>
      <rules>
        <clear />
        <rule name="ThemeRewrite">
          <match url="Theme/([a-z]{2,3})(?:[a-z\/]*)?" />
          <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
          <action type="Rewrite" url="theme.aspx?theme={R:1}" />
        </rule>
      </rules>
      <outboundRules>
        <clear />
        <rule name="Theme" enabled="true" stopProcessing="false">
          <match filterByTags="None" pattern="theme\.aspx\?theme=([a-z]{2,3})+" />
          <conditions logicalGrouping="MatchAll" trackAllCaptures="true">
            <add input="{Theme:{R:1}}" pattern="(.+)" />
          </conditions>
          <action type="Rewrite" value="Theme/{C:1}" />
        </rule>
      </outboundRules>
    </rewrite>
  2. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 29 Feb 2012 Link to this post

    Hello Saeid,

    We have not tested our controls in such scenarios so far. Can you please open a support ticket and send us a demo of your implementation as well as the steps needed to replicate this behavior so we can inspect it locally?

    All the best,
    Kate
    the Telerik team
    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 RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Saeid Kdaimati
    Saeid Kdaimati avatar
    48 posts
    Member since:
    May 2006

    Posted 29 Feb 2012 Link to this post

    I solved the problem by narrow down match pattern. Hope underneath sample help other to solve the problem.
    <outboundRules>
     <rule name="Theme" preCondition="IsHtml" enabled="true" stopProcessing="false">
                <match filterByTags="A" pattern="^theme\.aspx\?theme=([a-z]{2,3})+" />
                <conditions logicalGrouping="MatchAll" trackAllCaptures="true">
                            <add input="{Theme:{R:1}}" pattern="(.+)" />
                </conditions>
                <action type="Rewrite" value="/Theme/{C:1}" />
              </rule>
                    <preConditions>
                        <preCondition name="IsHtml">
                            <add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
                        </preCondition>
                    </preConditions>
            </outboundRules>
Back to Top