I’m trying to generate a sitemap.xml on the fly for a particular asp.net website.
I found a couple solutions:
Chinookwebs is working great but seems a bit inactive right now and it’s impossible to personalize the "priority" and the "changefreq" tags of each and every page, they all inherit the same value from the config file.
What solutions do you guys use?
Usually you’ll use an HTTP Handler for this. Given a request for…
…your handler will respond with a formatted XML sitemap. Whether that sitemap is generated on the fly, from a database, or some other method is up to the HTTP Handler implementation.
Here’s roughly what it would look like:
This code can be improved but that’s the basic idea.