What would be the best approach for saving site categories from sql server 2005 db for use with menu control(asp.net 3.5)? I already have the full xml sitemap string from dataset.GetXml(), so I 'only' need to take care of writing the xml to the file and avoid locking it up because the whole site navigation depends on this sitemap. What happens if a web user(or ftp client) opens the sitemap.xml for reading and at the same time the app tries to write new data to it? If there isn't a surefire way of doing this I think I'm going to stick with xmlDataSource.Data = ds.GetXml() and reading the categories from db on each request.