"The process cannot access the file because it is being used by another process"

jeffpeters

Member
Joined
Jul 28, 2006
Messages
14
Programming Experience
5-10
"The process cannot access the file because it is being used by another process"

Hi

I am trying to store some data locally in an .xml file to minimise traffic to the database and while I can read it without problem with the readonly XMLTextReader object, trying to overwrite it results in the following error.

The process cannot access the file 'C:\Inetpub\wwwroot\SurveyBuilder\xml\surveyrank.xml' because it is being used by another process.

How can I get around this locking while other files are reading it???

Thanks in advance

Jeff
 
You can't unless the other app change its access mode or change code to release the file sometimes.
 
Back
Top