The simplest answer is to write the XML to a string and store it in a static field.
(2) How do I get a string from a method that takes a XmlTextWriter... at the moment I'm creating the new XmlTextWriter(response. Output) so everything goes directly out to response. – Hainesy Oct 7 '10 at 14:04 1 Make a static method that returns a string, and call the method in the field's initializer.
That will be thread safe. – SLaks? Oct 7 '10 at 14:06 1 Make an XmlTextWriter around a new StringWriter, then call StringWriter.ToString().
– SLaks? Oct 7 '10 at 14:06 Darn the simplicity and my stupidity ;-) I've not done much with writers, can you tell!? Thanks!
– Hainesy Oct 7 '10 at 14:08.
You can probably find a way to make a HttpHandler do pretty close to this, but I use an aspx page instead of a handler, then just hit the aspx page during off hours when and it generates an xml file. Here is an example of how I handle mine. Since yours does lots of DB IO you will probably want to add some extra security so only you can run the page.
This puts things more on your terms of when you want it run. How-to Generate and Submit Your Sitemap to Google, Yahoo! , Bing, and Ask An Added Benefit - this also pings the search engines to let them know your sitemap has been update.
Should at least give you the jist. Hope this helps!
You can probably find a way to make a HttpHandler do pretty close to this, but I use an aspx page instead of a handler, then just hit the aspx page during off hours when and it generates an xml file. Here is an example of how I handle mine. Since yours does lots of DB IO you will probably want to add some extra security so only you can run the page.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.