I typically use URL rewriting to pass content IDs to my website, so this
Foo.1.aspx
rewrites to
Foo.aspx?id=1
For a specific application I need to pass in multiple IDs to a single page, so I've rewritten things to accept this:
Foo.1,2,3,4,5.aspx
This works fine in Cassini (the built-in ad hoc web server for Visual Studio) but gives me "Internet Explorer cannot display the webpage" when I try it on a live server running IIS. Is this an IIS limitation? Should I just use dashes or underscores instead of commas?
I recall that Url Routing by default first checks to see if the file exists, and commas are not legal in filenames, which is parhaps why you are getting errors. IIS may have legacy code that aborts the request before it can get to asp.net for processing.
Scott Hanselman's blog post talks a bit about this and may be relevant for you.
As general comment: Url rewriting is typically used to make a url friendly and easy to remember.
~/page.aspx?id=1,2,3,4
is neither worse nor better than~/page/1-2-3-4.aspx
: both are difficult to use so why go through the extra effort? Avoid creating new url forms just because you can. Users, help desk, and other developers will just be confused.Url rewriting is best utilized to transform
into
Answer
The problem was the commas. I'm guessing that IIS was having an issue with it (not IE) since IE was able to display it fine on localhost.
At any rate I just changed the URL format to this and it works fine: