D
dchadha
Hi,
I am working on application in C# which uses and stores data in xml
file. This app can use xml file from two different ways: (a) From User
Interface (Windows application) and (b) From Windows Service.
Both apps read data from xml file in dataset and update the file after
doing the desired operation on dataset. Now the problem is when windows
service reads the xml in dataset and while its doing the operation (it
takes few minutes) before updating the xml file, if I make any change
in xml file using windows app(UI), the changes are not applied as the
windows service writes the xml file from the dataset after the windows
app.
I hope I am able to explain my issue here.
Now what is the best way of avoiding it. I think if I am able to lock
the xml file while any of these two app is working on it, may be I will
solve this problem. But I don't know how to do that.
Thanks
Dinesh
I am working on application in C# which uses and stores data in xml
file. This app can use xml file from two different ways: (a) From User
Interface (Windows application) and (b) From Windows Service.
Both apps read data from xml file in dataset and update the file after
doing the desired operation on dataset. Now the problem is when windows
service reads the xml in dataset and while its doing the operation (it
takes few minutes) before updating the xml file, if I make any change
in xml file using windows app(UI), the changes are not applied as the
windows service writes the xml file from the dataset after the windows
app.
I hope I am able to explain my issue here.
Now what is the best way of avoiding it. I think if I am able to lock
the xml file while any of these two app is working on it, may be I will
solve this problem. But I don't know how to do that.
Thanks
Dinesh