UnauthorizedAccessException in HttpPostedFile.SaveAs but StreamWriter can write

  • Thread starter Thread starter Michael Huhn
  • Start date Start date
M

Michael Huhn

I have a WebForm with several File-Inputs. On the server side I loop
through the Request.PostedFiles and call a .SaveAs to a specific
subfolder of my web. I get a System.UnauthorizedAccessException for
the folder but when I try to write a file with a StreamWriter, it
works. Of course the folder has NTFS and IIS-Writing-permissions. What
can I do???
 
Thanks for the tip, I tried it but without success. After allowing
audit and acitvating it for this folder and subfolders, no event is
shown in the event viewer after the Exception. However, Everybody has
full access to this folder now but the exception still occurs :-(

Thanks for your help
Michael Huhn
MCAD
 
Back
Top