Sitemap Provider throws empty HttpException when reserved word is used for url
I ran across a strange bug today. Fortunately, Bill saw it first and lead me straight to it. I banged my head against it (unsuccessfully), trying to diagnose the cause of a System.Web.HttpException with no message being thrown from SiteNavNode.ChildNodes until my battery died on my laptop and then came into the office to continue. Good thing!
In the Financial Services industry, there is a company with the symbol PRN. I, of course, use directory urls to organize our dynamic website. PRN is a reserved word for urls because it is a reserved file system word. In my opinion, modern OS’s should not have this limitation, but I don’t know enough about it to suggest that it isn’t necessary.
If you attempt to create a file, with any extension, using the following list, it will fail to resolve in a browser.
|
This is also true of rewritten urls. I defensively have incorporated a lovely "~" into any url that attempts to name the path segment using one of these reserved words.
Leave a Reply