views:

19

answers:

0

Hi,

I thought I have URL routing under control as it works well on one website but found out it is not working fine on another. Both websites run from same server, same IIS 6.0, same asp_isapi.dll.

SETUP 1: This one works well:

            routes.MapPageRoute("Article SEO",
                        "sid/{sid}",
                        "~/ar.aspx",
                        true,
                        new RouteValueDictionary { },
                        new RouteValueDictionary { { "sid", @"^([a-zA-Z\-]*)+([a-zA-Z])+(.html)$" } }

                    );

SETUP 2: But this one, very similar is not working well:

        routes.MapPageRoute("Article",
                        "page/{sid}",
                        "~/page.aspx",
                        true,
                        new RouteValueDictionary { },
                        new RouteValueDictionary { { "sid", @"^([a-zA-Z0-9\-]*)+([a-zA-Z0-9])+(.html)$" } }
                    );

Testing Regex in the Regex Coach shows that they are written correctly, I mean they both catch good or wrong strings.

URL I use for the second one is http://address/page/some-html-keywords.html. If I specify URL like this it works well.

Problem is if I change .html extension for something like .htmls or .anything it completely kills web server. I have 100% process usage. I dont understand why and how, I dont have this problem with first setup. I can change it for whatever I want and it either shows page because I have correct format or shows 404 page not found.

Some examples:

http://address/page - 404 page, working correctly

http://address/page/test.html - accepted, working correctly

http://address/page/testing_#.html - 404 page, working correctly

http://address/page/test.htmls - wont show page, hanging, 100% process usage, not working correctly

http://address/page/test.whatever - wont show page, hanging, 100% process usage, not working correctly

http://address/page/page.aspx - redirects, working correctly

The same setup (with different Regex check) works well on other website within same IIS 6.0. Both use same asp_isapi.dll file.

I just dont get it. I have tried to comment all code in page.aspx to find out if there was problem with the code within page.aspx but it doesnt matter. It simply hangs with empty page as well. So must be problem with URL routing or isapi.dll or IIS. But other website on same IIS and same machine simply works.

Any opinions?

Thank you

Fero