Hi..

I am working in ASP.NET 2.0 + C#.

I am using the XmlDocument to read the data from an xml file. As the xml file is used by another thread, when I refresh the page, I sometimes get an error as :

An exception of type 'System.IO.IOException' occurred and was caught.
---------------------------------------------------------------------
Type : System.IO.IOException, mscorlib, Version=2.0.0.0, Culture=neutral,
Message : The process cannot access the file 'D:\my.xml' because it is being used by another process.

What should be done? How to close the XmlDocument? How to get around this scenario?

Please help..

Thanks.