M
Miro
Hello
For some strange reasons, some of my files become ReadOnly when I copy them to a subfolder to my ASP.NET application. For each new session I clear the temp folder using this code
private void ClearTempFolder(
//Remove all dwg-files from Tem
String[] dwgFiles = Directory.GetFiles(Server.MapPath(TempPath), "*.dwg")
for (int i=0; i<dwgFiles.Length; i++
File.Delete(dwgFiles)
then the user makes selections on the page and new drawings are copied to the temp folder
private void CopyDWGFileToTemp(
..
if (File.Exists(frompath)
File.Copy(frompath, Server.MapPath(topath), true)
..
Sometimes the ClearTempFolder() function fails with an "Access denied" error. If there are for example four files in the folder, two of them are deleted and the two remaining are ReadOnly, and probably causing the error. Sometimes all files are deleted without problem. This problem seems to occur on Windows 2003 Server only. Any ideas on this one
develop machine: Win XP, Framework 1.1, IIS 5.1, VS.NET 2003 (C#)
Settings: Anonymous Access (IUSR account) and Windows Authentication are checked in IIS. IUSR has full rights on the Temp-folde
Thanks
Miro
For some strange reasons, some of my files become ReadOnly when I copy them to a subfolder to my ASP.NET application. For each new session I clear the temp folder using this code
private void ClearTempFolder(
//Remove all dwg-files from Tem
String[] dwgFiles = Directory.GetFiles(Server.MapPath(TempPath), "*.dwg")
for (int i=0; i<dwgFiles.Length; i++
File.Delete(dwgFiles)
then the user makes selections on the page and new drawings are copied to the temp folder
private void CopyDWGFileToTemp(
..
if (File.Exists(frompath)
File.Copy(frompath, Server.MapPath(topath), true)
..
Sometimes the ClearTempFolder() function fails with an "Access denied" error. If there are for example four files in the folder, two of them are deleted and the two remaining are ReadOnly, and probably causing the error. Sometimes all files are deleted without problem. This problem seems to occur on Windows 2003 Server only. Any ideas on this one
develop machine: Win XP, Framework 1.1, IIS 5.1, VS.NET 2003 (C#)
Settings: Anonymous Access (IUSR account) and Windows Authentication are checked in IIS. IUSR has full rights on the Temp-folde
Thanks
Miro