Hello,
How can I manage files from ASP.NET C# 2.0?
I mean I would like to save/erase files, find files in a folder and
programatically check if the file with the specific name exists in a folder.
I tried to google a bit but I could not manage to find any page with
technical/practical approach to the problem.
Thank you in advance for any help
Darek T.
Alexey Smirnov - 04 Oct 2007 12:09 GMT
On Oct 4, 12:39 pm, "Dariusz Tomo?" <d.to...@mazars.pl> wrote:
> Hello,
>
[quoted text clipped - 7 lines]
>
> Darek T.
Look at the System.IO.File
http://www.google.com/search?hl=en&q=delete+file+asp.net
http://www.google.com/search?hl=en&q=save+file+asp.net
http://www.google.com/search?hl=en&q=open+file+asp.net
Juan T. Llibre - 04 Oct 2007 12:17 GMT
There's dozens of free solutions for that.
Don't try to reinvent the wheel.
This Google search will find many free solutions :
http://www.google.com/search?hl=en&q=%22file+manager%22+%22asp.net%22
The first link returned is this :
http://www.codeproject.com/aspnet/WebFileManager.asp
There's many more...
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
> Hello,
>
[quoted text clipped - 6 lines]
>
> Darek T.
Norman Yuan - 04 Oct 2007 15:52 GMT
To make it a bit more clear:
You can use System.IO to do all the file/folder manipulations, as long as
the user account used to run the ASP.NET application has the permission to
the targeting folders/files. By default, the user account running ASP.NET
has very limited permission to access folders/files on disk. You need to
study ASP.NET security/authorization to determine how to allow ASP.NET
running user account to do this type of IO access.
> Hello,
>
[quoted text clipped - 8 lines]
>
> Darek T.
clintonG - 04 Oct 2007 16:41 GMT
Yea, basically to really control what needs to be done with directory and
file management the person(s) controlling the server have to grant the
ASPNET user full user rights on the specific directory and its subsequent
subdirectories.
<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
> To make it a bit more clear:
>
[quoted text clipped - 17 lines]
>>
>> Darek T.