// you’re reading...

Techno-Babble

URL Rewriting and ASP.NET Browsers - is a beating

We’re lucky we have an error handler in our web app that emails us about every single unhandled error, or we wouldn’t know about this one at all.

The dreaded “cannot use leading .. to exit …” error.  If you do URL rewriting with ASP.NET, you probably see this a lot.  If you don’t, it’s probably because you’re just not seeing it.

Unfortunately it was another developer on our team that solved the problem and he’s gone and we’re both fuzzy on it.  But it basically boils down to the html writer that ASP.NET chooses to render the response from the page.  ASP.NET uses that browsers feature to figure this out, and if you are doing URL rewriting and an unknown browser comes along, the whole page fails with this weird, cryptic error.

Our work around so far has been to create new .browser files.  We created a generic Mozilla 5 .browser file with a clever regex in it, and that’s taken care of most of our issues.  But occasionally I get emails about others.  The Cuil web crawler, Twiceler, wasn’t recognized for a while, and I just got an email notification for a “PalmCentro” and there have been many others.

It’s getting really old.  There’s no reason that we shouldn’t just render the same response to all these browsers by default.  Is there?  Uggh.

Is MVC subject to this same weirdness?

Discussion

No comments for “URL Rewriting and ASP.NET Browsers - is a beating”

Post a comment