Freitag, 8. Juni 2012 08:20
I want to achieve the target is that the document can a upload itself to a server. But when i used this code, it said that Being used by another process, so the process can not access this file.
FileStream stream = new FileStream(file, FileMode.Open, FileAccess.Read, FileShare.Read);
Is there any way i read it to a FileStream?
Samstag, 9. Juni 2012 21:28
What's document you opened? As far as I know that Office suite (such as Excel, Word or PowerPoint) will not allow other program access the file when them open the specific file. And If you want to upload them to a server, you need close the document before you update it.
- Als Antwort markiert Tao636 Montag, 11. Juni 2012 01:41
Montag, 11. Juni 2012 01:39
Thank you for your reply! It seems that I have no way but close it when I upload it.
Thank you again!