Previous Next

Thread: URL Rewrite and Ajax.Net

Last post 08-05-2008 4:42 PM by ccornman. 4 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (5 items)

Sort Posts:

  • 07-30-2008, 4:43 PM

    • ccornman
    • Not Ranked
    • Joined on 07-11-2008, 11:59 AM
    • Posts 3

    URL Rewrite and Ajax.Net

    I am having an issue that I believe is caused by my URL rewrite module.  I am using Ajax.net on my main site and it is working fine.  I am trying to bring this same AJAX functionality to my subdomain (which has the URL Rewrite module for IIS 7 running) though I am getting an error with it not being able to find my class that is registered for ajax use.  If I bypass my URL rewrite rules, it gets through.

    So basically, I'm looking to NOT redirect requests for /ajax/*.ashx

     
    I have the is a file and is a directory rules and this is not catching it.  Any suggestions?  (I'm fairly new to all of this so if I need to elaborate please let me know, thanks!)
     

  • 07-30-2008, 5:15 PM In reply to

    Re: URL Rewrite and Ajax.Net

    ashx files are dynamically (in AjaxPro) created so you should not have a folder  and thus the rule may not understand that. Can you just ignore ashx files?

  • 07-30-2008, 5:24 PM In reply to

    • ccornman
    • Not Ranked
    • Joined on 07-11-2008, 11:59 AM
    • Posts 3

    Re: URL Rewrite and Ajax.Net

    What would the regex expression be for this?  I tried a few and it wasn't helping me, though I am very weak at regex.
  • 07-30-2008, 6:29 PM In reply to

    • ruslany
    • Top 25 Contributor
    • Joined on 07-01-2007, 7:38 PM
    • Redmond, WA
    • Posts 202

    Re: URL Rewrite and Ajax.Net

    You can create a rule that matches the ashx extension and then stops processing:

    <rule name="Ignore ashx" patternSyntax="Wildcard" stopProcessing="True">
      <match url="*.ashx">
      <action Type="None">
    </rule>

     Make sure this rule is in the beginning of the <rules> collection.

    http://ruslany.net
    Tags:
  • 08-05-2008, 4:42 PM In reply to

    • ccornman
    • Not Ranked
    • Joined on 07-11-2008, 11:59 AM
    • Posts 3

    Re: URL Rewrite and Ajax.Net

    Thanks for the help, I tweaked it slightly to get it to work and here is the rule I put in:

     

                    <rule name="Ignore ashx" patternSyntax="Wildcard" stopProcessing="true">
                        <match url="*.ashx" />
                    </rule>

     

    Great work on this module so far, it has helped me a lot!

Page 1 of 1 (5 items)
Page view counter