XML file and asp.net application

  • Thread starter Thread starter Madhuri Mittal
  • Start date Start date
M

Madhuri Mittal

I have been developing an ASP.Net application which uses a
XML file to read data. I realized if I have to modify the
XML file to change the data, I have to stop my w3svc. I am
beginning to think it may not be such a good idea to use
an XML file to read data after all if I have to stop the
service everytime to modify its contents especially if I
am using a external web hosting service. Does anybody have
any suggestions other than using a database or comments on
this?

Thanks
 
I don't have to stop anything to write to an XML file. You just need to
give the account ASPNET is running under write permission to the file.
 
You shouldn't need to stop the service. Just read the file in, change what
needs to be changed, and write the XML back to the drive.

What errors are you getting that forces you to stop the service?
 
Hello,

Thanks a lot for your reply. Basically I am not trying to
write anything into the XML file from within my program >
I just read from it. The problem is it has certain
settings ( its not the config file , just my own xml
file ) that I need to change externally of the program.
When I make the changes and try to save it, I get the
message saying 'Cannot access file:another application is
using it" ( the words are not exact by the way) . I stop
the w3svc, then I can access the file, save to it. The
reason I am concerned about this is if I use an external
hosting service to host my asp.net app, it will be a mess
if I have to change the settings often. I know the
Microsoft portal app. uses an xml file to read some
program setting...I am following the same model...

Thanks

Madhuri
 
Back
Top