ID

Uploaded

Status

Description

Work Items

Action

5093
by jasonshortphd
Jan 27, 2010
12:14 AM

Being evaluated

In the WriteResult function of SitemapHandler there is an exception when a path can't load the path correctly. Putting it in a try catch and handling the exception case to mean no file present works well.

if (string.IsNullOrEmpty(siteMapNode["lastmod"]))
{
string physicalPath = string.Empty;
try
{
physicalPath = Request.MapPath(siteMapNode.Url);
}
catch (HttpException)
{
// Can't look that path up - skip it
return null;
}

Download

View All
  • 1-1 of 1 Patches
    • Previous
    • 1
    • Next
    • Showing
    • All
    • Patches