The process cannot access the file

Last post 07-12-2009, 9:13 PM by cutechat. 1 replies.
Sort Posts: Previous Next
  •  07-12-2009, 8:36 AM 53915

    The process cannot access the file

     

    I have a wizard type page where the user enters some information into textboxes, there is also a CuteWebUI:UploadAttachments, control in the page where the user is allow to upload up x number of images. After the user has finish the data entry part, he/she click NEXT and the post is display for the user to confirm that the post looks like he/she intended. In this confirmation view the images are display as thumbnails, pointing to the tem directory where the images where uploaded. If the user clicks back to the original data entry view and try to remove a file, the CuteWebUI:UploadAttachments  control throws an error:

     

    The process cannot access the file 'C:"Inetpub….jpg.resx' because it is being used by another process.

     

    I understand the cause of this error, basically the file still attached to the process due to the image being displayed on the confirmation view. Is there a way to avoid this situation?

  •  07-12-2009, 9:13 PM 53916 in reply to 53915

    Re: The process cannot access the file

    Hi,
     
    You can use control.Items[i].Remove() , instead of deleting the file.
     
    The temp file will be maintained in 6 hours.
     
    Regards,
    Terry
View as RSS news feed in XML