This is a migrated thread and some comments may be shown as answers.

IIS URL Rewrite

2 Answers 170 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Saeid Kdaimati
Top achievements
Rank 2
Saeid Kdaimati asked on 24 Feb 2012, 10:51 AM
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 Answers, 1 is accepted

Sort by
0
Kate
Telerik team
answered on 29 Feb 2012, 11:16 AM
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.
0
Saeid Kdaimati
Top achievements
Rank 2
answered on 29 Feb 2012, 12:24 PM
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>
Tags
Menu
Asked by
Saeid Kdaimati
Top achievements
Rank 2
Answers by
Kate
Telerik team
Saeid Kdaimati
Top achievements
Rank 2
Share this question
or