![]() |
|
|
|||
|
StreamWriter creation error
Hi There,
Our application creates a file using StreamWriter. The application creates the file in a unique path and deletes the folder after the file is transferred to a designated location (a network drive or a another folder). The problem that we are facing is that some times (usually after more than 12000 to 18000 such file/folder operations i.e., create folder, create file, transfer, delete) the StreamWriter creation fails with "Could not find a part of the path" error. Here's my flight log for the error. As becomes obvious from the log, the File creation failed with the path error even after the directory was created successfully. So my doubt is, does the .Net framework (or Windows) cache folder creation? I read something akin to this here http://blogs.msdn.com/bclteam/archiv...02/434689.aspx 2008/07/16 17:20:35:665 Directory Created: E:\Sessions \20080716-052035665_Macro 2008/07/16 17:20:35:665 Directory Created: E:\Sessions \20080716-052035665_Macro\Temp 2008/07/16 17:25:34:900 Could not find a part of the path E:\Sessions \20080716-052035665_Macro\Temp\20080716-052035665.txt Thanks in advance for all your responses, Musthafa |
|
|||
|
Re: StreamWriter creation error
Are you using multithread in your application?
"Matt" <musthafa.manikkoth@gmail.com> wrote in message news:5b84eee4-0988-41ce-94fd-403ee7f7eec8@z72g2000hsb.googlegroups.com... > Hi There, > Our application creates a file using StreamWriter. The application > creates the file in a unique path and deletes the folder after the > file is transferred to a designated location (a network drive or a > another folder). The problem that we are facing is that some times > (usually after more than 12000 to 18000 such file/folder operations > i.e., create folder, create file, transfer, delete) the StreamWriter > creation fails with "Could not find a part of the path" error. Here's > my flight log for the error. As becomes obvious from the log, the File > creation failed with the path error even after the directory was > created successfully. So my doubt is, does the .Net framework (or > Windows) cache folder creation? I read something akin to this here > http://blogs.msdn.com/bclteam/archiv...02/434689.aspx > > 2008/07/16 17:20:35:665 Directory Created: E:\Sessions > \20080716-052035665_Macro > 2008/07/16 17:20:35:665 Directory Created: E:\Sessions > \20080716-052035665_Macro\Temp > 2008/07/16 17:25:34:900 Could not find a part of the path E:\Sessions > \20080716-052035665_Macro\Temp\20080716-052035665.txt > > Thanks in advance for all your responses, > Musthafa > > |
![]() |
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|