如何使用ASP.NET 2.0创建文件夹? [英] How to create a file folder using ASP.NET 2.0 ?

查看:63
本文介绍了如何使用ASP.NET 2.0创建文件夹?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

全部

我正在尝试为任何登录用户创建文件夹,并在网页上为用户创建子

文件夹。用户再次登录后,他只能在网页上看到自己的文件夹。我打算使用VB2005或C#。


我查看帮助文件并在网上搜索,我找不到答案。

这可能在ASP.NET 2.0中出现了吗?

谢谢


kai

解决方案

5月25日,9:01 pm,kai < kaili ... @ bellsouth.netwrote:


全部

我正在尝试为任何登录用户创建一个文件夹,并在网页上为用户创建子

文件夹。用户再次登录后,他只能在网页上看到自己的文件夹。我打算使用VB2005或C#。



kai,


使用DirectoryInfo.Create创建新文件夹


对于每个用户/文件夹,创建一个web.config文件


<?xml version =" 1.0"编码= QUOT; UTF-8英寸?>

< configuration>

< system.web>

< authorization>

< ; allow users =" usernamehere" />

< deny users =" *" />

< / authorization>

< /system.web>

< / configuration>


并在文件夹中找到它。它有助于保护文件夹免受未经授权的访问。


也许你可以详细解释你想要做什么


这肯定可以完成,但我想分享我在网络服务器上的文件的经验:


我为用户文件设计了一个上传功能,但过了一段时间后,网络服务器的

管理员对这些

文件(CD图像和其他文件)的数量不太高兴。大文件)。经过一番思考后,我已决定另外一个选项获得
;将用户文件存储在SQL服务器上的blob-fields中。

管理员说这个服务器有无限的空间,他们只增加了更多的

HDD'远在TB 。好吧,通过这种方式很容易存储用户ID和

文件以及你想要控制访问的其他所有内容。


Bjorn


" kai" < ka ****** @ bellsouth.net写信息

新闻:所以***************** @ bignews5.bellsouth.net。 ..


全部

我正在尝试为任何登录用户创建一个文件夹,并创建子

网页上用户的文件夹。用户再次登录后,他只能在网页上看到自己的文件夹。我打算用VB2005或

C#。


我查看帮助文件并在网上搜索,我找不到答案。

是否可以在ASP.NET 2.0中使用?


谢谢


kai


Alexey,

感谢您的帮助!

我想创建一个管理授权用户文件的网站,

上传和下载。


1.用户可以在网页上为自己创建文件夹和子文件夹,

然后可以在网页上的树视图中看到他的文件夹。然后用户可以上传文件并从他的owen文件夹和子文件夹下载文件。


2.下次用户登录时,他只能看到他的欧文文件夹

显示在网页上,并且不受其他

用户的访问。

谢谢


Kai


" Alexey Smirnov" < al ************ @ gmail.comwrote in message

news:11 ****************** **** @ u30g2000hsc.googlegr oups.com ...


5月25日晚9:01,kai < kaili ... @ bellsouth.netwrote:


>全部
我正在尝试为任何登录用户创建一个文件夹,并且在网页上为用户创建子文件夹。用户再次登录后,他只能在网页上看到自己的文件夹。我打算使用VB2005或C#。



kai,


使用DirectoryInfo.Create创建新文件夹


对于每个用户/文件夹,创建一个web.config文件


<?xml version =" 1.0"编码= QUOT; UTF-8英寸?>

< configuration>

< system.web>

< authorization>

< ; allow users =" usernamehere" />

< deny users =" *" />

< / authorization>

< /system.web>

< / configuration>


并在文件夹中找到它。它有助于保护文件夹免受未经授权的访问。


也许你可以详细解释你想要做什么



Hi, All
I am trying to create a file folder for any login user, and create sub
folders for the user on a web page. After the user login again, he can only
sees his own folder on the Web page. I am planning to use VB2005 or C#.

I look the help files and searched on the web, I cannot find the answer. Is
this possble in ASP.NET 2.0?
Thanks

kai

解决方案

On May 25, 9:01 pm, "kai" <kaili...@bellsouth.netwrote:

Hi, All
I am trying to create a file folder for any login user, and create sub
folders for the user on a web page. After the user login again, he can only
sees his own folder on the Web page. I am planning to use VB2005 or C#.

kai,

use DirectoryInfo.Create to create the new folders

For each user/folder create a web.config file

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<authorization>
<allow users="usernamehere" />
<deny users="*" />
</authorization>
</system.web>
</configuration>

and locate it in the folder. It helps to protect a folder from
unauthorized access.

Maybe you can explain more detail exactly what do you want to do


This can surely be done, but I would like to share my experience on files on
the web-server:
I designed an upload function for user files, but after some time the
administrator of the web-server was less happy about the volume of these
files (CD images and other large files). After some pondering I have decided
for another option; storing the user files in blob-fields on an SQL-server.
The administrator said this server had unlimited space, they only add more
HDD''s far into TB. Well, in that way it is easy to store userid along with
the file and everything else you want to control access.

Bjorn

"kai" <ka******@bellsouth.netwrote in message
news:so*****************@bignews5.bellsouth.net...

Hi, All
I am trying to create a file folder for any login user, and create sub
folders for the user on a web page. After the user login again, he can
only sees his own folder on the Web page. I am planning to use VB2005 or
C#.

I look the help files and searched on the web, I cannot find the answer.
Is this possble in ASP.NET 2.0?
Thanks

kai



Alexey,
Thank you for your help!
I want to create a web site which manages files for authorized users,
uploading and downloading.

1. A user can create a folder and sub folders for himself on a web page,
then can see his folders in tree views on the web page. The user can then
upload files and download files from his owen folder and subfolders.

2. The next time the user logs in, he will only see his owen folders
displayed on the web page, and it is protected from being accessed by other
users.
Thanks

Kai

"Alexey Smirnov" <al************@gmail.comwrote in message
news:11**********************@u30g2000hsc.googlegr oups.com...

On May 25, 9:01 pm, "kai" <kaili...@bellsouth.netwrote:

>Hi, All
I am trying to create a file folder for any login user, and create sub
folders for the user on a web page. After the user login again, he can
only
sees his own folder on the Web page. I am planning to use VB2005 or C#.


kai,

use DirectoryInfo.Create to create the new folders

For each user/folder create a web.config file

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<authorization>
<allow users="usernamehere" />
<deny users="*" />
</authorization>
</system.web>
</configuration>

and locate it in the folder. It helps to protect a folder from
unauthorized access.

Maybe you can explain more detail exactly what do you want to do



这篇关于如何使用ASP.NET 2.0创建文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆