G
Guest
Hi there,
I got a web application in vb.net that uploads a .zip file to a subfolder
inside the root folder of the web application.
c:\Inetpub\wwwroot\MyWebApp\uploaddir
Then, a c# library unzips it inside another subfolder inside the subfolder
where the .zip was uploaded.
c:\Inetpub\wwwroot\MyWebApp\uploaddir\unzip
Then the same c# library moves all unzipped files to a whole new location,
outside the web application, but it is by the way configured in IIS as
another virtual directory.
c:\Permanent Repository
The code in c# that makes the move is shown below:
DirectoryInfo[] unzippedfilesdir = uploaddir.GetDirectories();
FileInfo[] unzippedfiles = unzippedfilesdir[0].GetFiles();
foreach (FileInfo afile in unzippedfiles)
afile.MoveTo(m_permanentrepository + "\\" + afile.Name);
In a test I am doing, there is a zip file with +200 files in it. The
routine that moves the unzipped files works just fine until it reaches the
108th file. It throws a "Access to the path is denied" exception when it
tries the MoveTo method on that file.
<machinename>\ASPNET user has all permissions granted on both dirs (source
and destination). I have not opened nor used any of the unzipped files prior
to begin to move them. It is solely a process of uploading, unzipping, and
moving, and that's it.
What is going on then???
The file that the routine tries to move and fails is a ASP file
("info.asp"). Does that got anything to do with the problem? If it does,
then how come this was working 2 months ago, and now it is not? Is it
perhaps some sort of configuration that had been changed without me knowing
it?
I will highly appreciate if someone sheds a light on this case promptly.
Many thanks!
I got a web application in vb.net that uploads a .zip file to a subfolder
inside the root folder of the web application.
c:\Inetpub\wwwroot\MyWebApp\uploaddir
Then, a c# library unzips it inside another subfolder inside the subfolder
where the .zip was uploaded.
c:\Inetpub\wwwroot\MyWebApp\uploaddir\unzip
Then the same c# library moves all unzipped files to a whole new location,
outside the web application, but it is by the way configured in IIS as
another virtual directory.
c:\Permanent Repository
The code in c# that makes the move is shown below:
DirectoryInfo[] unzippedfilesdir = uploaddir.GetDirectories();
FileInfo[] unzippedfiles = unzippedfilesdir[0].GetFiles();
foreach (FileInfo afile in unzippedfiles)
afile.MoveTo(m_permanentrepository + "\\" + afile.Name);
In a test I am doing, there is a zip file with +200 files in it. The
routine that moves the unzipped files works just fine until it reaches the
108th file. It throws a "Access to the path is denied" exception when it
tries the MoveTo method on that file.
<machinename>\ASPNET user has all permissions granted on both dirs (source
and destination). I have not opened nor used any of the unzipped files prior
to begin to move them. It is solely a process of uploading, unzipping, and
moving, and that's it.
What is going on then???
The file that the routine tries to move and fails is a ASP file
("info.asp"). Does that got anything to do with the problem? If it does,
then how come this was working 2 months ago, and now it is not? Is it
perhaps some sort of configuration that had been changed without me knowing
it?
I will highly appreciate if someone sheds a light on this case promptly.
Many thanks!