R
Radek
Hi,
I have the following problem with FileStream. In this line:
FileStream file = new FileStream(filePath, FileMode.Append);
there is an exception FileNotFoundException. But for sure path and file name
(which are both concatenated to filePath) is correct and leads to the
existing directory. User on which application is running has full permision
to the destination folder. On MSDN stands that FileMode.Append ensures that
if file exists it will be opened otherwise new file will be created.
I've cheked other constructors of the FileStream class and the same
exception is thrown. The most surprising thing is that bug does not occur in
all cases. It is possible to change destination folder and everything is ok.
Can the problem be caused by number of files in destination folder (there is
more than tousand files)?
Do you have any suggestion what should I do? Or do you know why such
exception can occur?
My environment:
I'm using ASP.NET 2.0 on IIS 6.0 (Windows 2003). Destination folder is on
the other computer in the same domain (Active Directory is in use).
I have the following problem with FileStream. In this line:
FileStream file = new FileStream(filePath, FileMode.Append);
there is an exception FileNotFoundException. But for sure path and file name
(which are both concatenated to filePath) is correct and leads to the
existing directory. User on which application is running has full permision
to the destination folder. On MSDN stands that FileMode.Append ensures that
if file exists it will be opened otherwise new file will be created.
I've cheked other constructors of the FileStream class and the same
exception is thrown. The most surprising thing is that bug does not occur in
all cases. It is possible to change destination folder and everything is ok.
Can the problem be caused by number of files in destination folder (there is
more than tousand files)?
Do you have any suggestion what should I do? Or do you know why such
exception can occur?
My environment:
I'm using ASP.NET 2.0 on IIS 6.0 (Windows 2003). Destination folder is on
the other computer in the same domain (Active Directory is in use).