Ask a Question related to ASP.NET Security, Design and Development.
-
Miro #1
Files become ReadOnly
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[i])
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
Miro Guest
-
Readonly listbox
I'm developing a set of WebControls that can be toggled between Readwrite and Readonly modes. They are each inherited from their standard webcontrol... -
Files not showing readonly or checked out
I connected to my remote folder on my web server and synchronized the local view with the remote view. this worked fine. The problem is that the... -
ANNOUNCE: Readonly 1.03
ANNOUNCEMENT Readonly.pm, v1.03 has been uploaded to PAUSE, and should be available at a CPAN near you Real Soon Now. DESCRIPTION Readonly.pm... -
Making Files Readonly With a script
On Tue, 26 Aug 2003 21:50:02 +0100, JRH <john.nntp@yoredale2003.uklinux.net> wrote: For the cron.daily script, make sure you use full paths for... -
Readonly Checkbox?
Well, I'm sure you guys know that the ASP.NET Checkbox control doesn't have a Readonly property. I'm writing an application where I need it to... -
David Coe, MCP #2
RE: Files become ReadOnly
It sounds like you need to declare the FileMode for the file(s) using the FileMode attribute.
David Coe, MCP Guest



Reply With Quote

