The process cannot access the file
Hi All,
I have a situtation my application is running on windows 2003 server which is a domain and in web.config
<Identity impersonation=true username=ABC\XYZ password=******>
what i am doing in the code that i take folder path from user and retrive all file information from that folder and writing to a CSV file which i am creating
using StreamWriter.
Dim objSW As StreamWriter = New StreamWriter("MMLIVFILTRE_080721_165835.CSV")
Problem is when user enter path like : 'C:\Foldername' then it is working fine and writing all the files informatin in to the file which is created by streamwriter.
but when user enter path : '\\servername\c$\foldername' then is is giving me the below error
Exception: System.IO.IOException: The process cannot access the file 'D:\MMLIVFILTRE_080721_165835.CSV' because it is being used by another process.
'MMLIVFILTRE_080721_165835.CSV' in this file i am writing the information which is created by streamwiter.
can u tell me why this error is occuring. please tell me wher i am doing wrong ?
Thanks
-nelly
|