Click here to Skip to main content
15,887,967 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Experts,

I have a problem while using MSXML2::IXMLDOMDocumentPtr save() function. I have an application which listens to a port. The application is creating different xmls while recieving requests and saves those created xml's in a folder in the "AppData". There are about 30 request and in response 30 xml's were created. The xml's are named as "Resp1.xml, Resp2.xml, Resp3.xml, etc".

But some of the time application is thrown an exception at the point of code where saving the xml.
This is not happening all the time. The exception says "The process can't access the file because it is being used up by another process".

Please help me .

Thanks,
Satheesh
Posted

1 solution

I doubt we'd be able to help you with this online, as you'd probably need to debug it. At the very least some more information would be needed.

However, having said that:

1) Are you making sure that you close (dispose) any object (e.g. StreamWriter) that you use to access the file?
2) Have you tried to find out what is locking the file - e.g. by using process explorer? Is it your application or another one?

Regards,
Ian.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900