useFileModifiedDate

Sep 29, 2007 at 8:14 PM
Where do I set this to true? You said it goes as a query string but I want to make sure it is really being set because it is not in the sitemap.axd.
Oct 14, 2008 at 6:08 AM
Find all "useFileModifiedDate", Match case, Subfolders, Keep modified files open, Find Results 1, "Entire Solution", "*.*"
  C:\Users\artur\Documents\Web\center-invest\www\Newtonsoft.Sitemaps\SitemapHandler.cs(46):      bool useFileModifiedDate = Sitemaps.UseFileModifiedDate;
  C:\Users\artur\Documents\Web\center-invest\www\Newtonsoft.Sitemaps\SitemapHandler.cs(61):      // get useFileModifiedDate override from querystring if it exists
  C:\Users\artur\Documents\Web\center-invest\www\Newtonsoft.Sitemaps\SitemapHandler.cs(62):      if (!string.IsNullOrEmpty(Request.QueryString["useFileModifiedDate"]))
  C:\Users\artur\Documents\Web\center-invest\www\Newtonsoft.Sitemaps\SitemapHandler.cs(66):          useFileModifiedDate = Convert.ToBoolean(Request.QueryString["useFileModifiedDate"]);
  C:\Users\artur\Documents\Web\center-invest\www\Newtonsoft.Sitemaps\SitemapHandler.cs(70):          throw new ArgumentException("Error parsing 'useFileModifiedDate'. Valid values are True or False.", "useFileModifiedDate", ex);
  C:\Users\artur\Documents\Web\center-invest\www\Newtonsoft.Sitemaps\SitemapHandler.cs(86):      if (useFileModifiedDate)
  C:\Users\artur\Documents\Web\center-invest\www\Newtonsoft.Sitemaps\Sitemaps.cs(41):        private static bool _useFileModifiedDate;
  C:\Users\artur\Documents\Web\center-invest\www\Newtonsoft.Sitemaps\Sitemaps.cs(56):                            _useFileModifiedDate = sitemapSection.UseFileModifiedDate;
  C:\Users\artur\Documents\Web\center-invest\www\Newtonsoft.Sitemaps\Sitemaps.cs(61):                            _useFileModifiedDate = false;
  C:\Users\artur\Documents\Web\center-invest\www\Newtonsoft.Sitemaps\Sitemaps.cs(91):                return _useFileModifiedDate;
  C:\Users\artur\Documents\Web\center-invest\www\Newtonsoft.Sitemaps\SitemapSection.cs(58):    [ConfigurationProperty("useFileModifiedDate", DefaultValue = false)]
  C:\Users\artur\Documents\Web\center-invest\www\Newtonsoft.Sitemaps\SitemapSection.cs(61):      get { return (bool) base["useFileModifiedDate"]; }
  C:\Users\artur\Documents\Web\center-invest\www\Newtonsoft.Sitemaps\SitemapSection.cs(62):      set { base["useFileModifiedDate"] = value; }
  Matching lines: 13    Matching files: 3    Total files searched: 1818

Make shure that you can add  this tag into an xml manually (which loaded into Sitemaps.UseFileModifiedDate property value), an of cause, you can use this:

[ConfigurationProperty("useFileModifiedDate", DefaultValue = false)]

to

[ConfigurationProperty("useFileModifiedDate", DefaultValue = true)]
Jun 7, 2010 at 1:32 PM
Edited Jun 7, 2010 at 1:33 PM
Add a new section to configSections called sitemaps:
<configuration>
<configSections>
<section name="sitemaps" type="Newtonsoft.Sitemaps.SitemapSection"/>...
...
</configSections>

Then add a node as a peer of appSettings:

<sitemaps useFileModifiedDate="True"></sitemaps>
<appSettings />