We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

File In Use Error

Thread ID:

Created:

Updated:

Platform:

Replies:

91042 Oct 31,2009 01:53 AM UTC Nov 4,2009 04:33 PM UTC ASP.NET Web Forms (Classic) 3
loading
Tags: DocIO
Todd J
Asked On October 31, 2009 01:53 AM UTC

I just upgraded from 6.4.0.15 to 7.3.0.20. The following code worked fine but now I get an error trying to delete a file after I'm done processing it.

The error states:
The process cannot access the file 'C:\Temp\Repository\DownloadedFiles\129014271797369801_1-8' because it is being used by another process.

The file is downloaded from another server and then added to the document. I then try to delete the file since I don't need it anymore. The error is thrown on the last statement below. When I comment out that statement everything runs fine and the document contains the image as expected, except the file still exists in my temp folder because I can't delete it.

This is the code I'm using :

Dim picture As IWPicture = cell.AddParagraph.AppendPicture(New Bitmap(imagePath))
picture.Image.Dispose()
File.Delete(imagePath)

Thanks
Todd

Jafrin [Syncfusion]
Replied On November 2, 2009 04:21 PM UTC

Hi Todd,

Thank you for using Syncfusion Products.

We are able to see the mentioned issue. We have notified our development team regarding this issue. We recommend you to update this issue through Direct Trac and you can work around this issue by using the code snippet used in the sample given below.

Sample:
http://files.syncfusion.com/support/DocIO.Web/Forum/91042/91042.zip

Regards,
Jafrin J

Todd J
Replied On November 2, 2009 09:12 PM UTC

Thanks for your response.

I am a vb.net developer, do you have a sample for vb.net in VS2005?

Thanks
Todd

Jafrin [Syncfusion]
Replied On November 4, 2009 04:33 PM UTC

Hi Todd,

Thank you for your update.

Could you please find the VB sample from the below link.

Sample:
http://files.syncfusion.com/support/DocIO.Web/Forum/91042/ImageDispose.zip

Please let us know if you have any questions.

Regards,
Jafrin J

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;