Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VC10.0
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 13-Apr-13 7:53am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 565
1 Maciej Los 319
2 Richard MacCutchan 220
3 BillWoodruff 164
4 Mathew Soji 160
0 OriginalGriff 8,654
1 Sergey Alexandrovich Kryukov 7,407
2 DamithSL 5,639
3 Maciej Los 5,229
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web04 | 2.8.1411023.1 | Last Updated 13 Apr 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100