Web application - writeing to disk

  • Thread starter Thread starter budhA
  • Start date Start date
B

budhA

Hi!

What do I need to do if I want to write (with a stream) to file that is in a
root dir of Web application or any other file on the disk.

Thnx
 
Budha,
What do I need to do if I want to write (with a stream) to file that is in
a root dir of Web application or any other file on the disk.


You mean on the same computer?

Cor
 
Patrice said:

The problem is that when I open a stream to the file I can only read it and
not write to it (CanWrite prperty is set to false). I think that the problem
is with the premissions of the virtual dir where web app is, but I don't
know how to set those premissions in IIS (not exactly).
If I open a stream to the file with win app or something else that is not a
Web site (VS 2005 beta2) I can read and write but with web app I can't. Why?
 
Please always show us the whole picture. It's far easier to react to a
particular problem rather than to let us list all unrelated failures that
could arise...

The web app runs under the ASPNET account. You could :
- put the file in a directory made for this purpose
- set the NTFS file permission so that ASPNET (or the account you are using)
is allowed to write the content
- if under the web root, you may want to disable IIS access (clear the
"Read" checkbox in IIS for this directory security)
 
Back
Top