PC Review


Reply
Thread Tools Rating: Thread Rating: 2 votes, 1.00 average.

How to create a file folder using ASP.NET 2.0 ?

 
 
kai
Guest
Posts: n/a
 
      25th May 2007
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


 
Reply With Quote
 
 
 
 
Alexey Smirnov
Guest
Posts: n/a
 
      25th May 2007
On May 25, 9:01 pm, "kai" <kaili...@bellsouth.net> wrote:
> 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

 
Reply With Quote
 
Bjorn Sagbakken
Guest
Posts: n/a
 
      25th May 2007
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" <(E-Mail Removed)> wrote in message
news:soG5i.9089$(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
kai
Guest
Posts: n/a
 
      25th May 2007
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On May 25, 9:01 pm, "kai" <kaili...@bellsouth.net> wrote:
>> 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
>



 
Reply With Quote
 
kai
Guest
Posts: n/a
 
      25th May 2007
Bjorn,
Thank you very much for your help.
After storing files in the SQL Server, can them be organized in the
folders? Can user download the files from SQL Server?


Thanks

Kai

"Bjorn Sagbakken" <bjo-(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:soG5i.9089$(E-Mail Removed)...
>> 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
>>

>
>



 
Reply With Quote
 
Bjorn Sagbakken
Guest
Posts: n/a
 
      25th May 2007
Of course, the user can download the files from the SQL server. The user
will not know the difference, not knowing exactly where the files have been
stored. After all, the user experience only basic HTML at his end. At the
server end there may be all sorts of magic...

Bjorn

"kai" <(E-Mail Removed)> wrote in message
news:VPI5i.9768$(E-Mail Removed)...
> Bjorn,
> Thank you very much for your help.
> After storing files in the SQL Server, can them be organized in the
> folders? Can user download the files from SQL Server?
>
>
> Thanks
>
> Kai
>
> "Bjorn Sagbakken" <bjo-(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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" <(E-Mail Removed)> wrote in message
>> news:soG5i.9089$(E-Mail Removed)...
>>> 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
>>>

>>
>>

>
>



 
Reply With Quote
 
Alexey Smirnov
Guest
Posts: n/a
 
      25th May 2007
On May 25, 11:39 pm, "kai" <kaili...@bellsouth.net> wrote:
> 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.
>


In principle, you don't need to create a folders. As Bjorn said, there
may be all sorts of magic. A "directory tree" can be saved as a
configuration in a database. All files can be either uploaded to
server drive in a global directory (plus names of the files in the
database), or stored directly in a database, as Bjorn has told you.

There are pros and cons of each solution and also a lot of discussions
about that matter

Just found an article that might be interesting to you, take a look
http://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=414

 
Reply With Quote
 
kai
Guest
Posts: n/a
 
      25th May 2007
Alexey,
This is a huge help! Thanks
Kai
"Alexey Smirnov" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On May 25, 11:39 pm, "kai" <kaili...@bellsouth.net> wrote:
>> 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.
>>

>
> In principle, you don't need to create a folders. As Bjorn said, there
> may be all sorts of magic. A "directory tree" can be saved as a
> configuration in a database. All files can be either uploaded to
> server drive in a global directory (plus names of the files in the
> database), or stored directly in a database, as Bjorn has told you.
>
> There are pros and cons of each solution and also a lot of discussions
> about that matter
>
> Just found an article that might be interesting to you, take a look
> http://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=414
>



 
Reply With Quote
 
kai
Guest
Posts: n/a
 
      26th May 2007
Bjorn ,
Thank for sharing your experiences.
After I insert a file for the user, how do you retrive the file for the
user? do you insert username and password into the files_Table?


Thanks

Kai

"Bjorn Sagbakken" <bjo-(E-Mail Removed)> wrote in message
news:Q96dnVy9-(E-Mail Removed)...
> Of course, the user can download the files from the SQL server. The user
> will not know the difference, not knowing exactly where the files have
> been stored. After all, the user experience only basic HTML at his end. At
> the server end there may be all sorts of magic...
>
> Bjorn
>
> "kai" <(E-Mail Removed)> wrote in message
> news:VPI5i.9768$(E-Mail Removed)...
>> Bjorn,
>> Thank you very much for your help.
>> After storing files in the SQL Server, can them be organized in the
>> folders? Can user download the files from SQL Server?
>>
>>
>> Thanks
>>
>> Kai
>>
>> "Bjorn Sagbakken" <bjo-(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> 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" <(E-Mail Removed)> wrote in message
>>> news:soG5i.9089$(E-Mail Removed)...
>>>> 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
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
Alexey Smirnov
Guest
Posts: n/a
 
      26th May 2007
On May 26, 3:11 pm, "kai" <kaili...@bellsouth.net> wrote:
> Bjorn ,
> Thank for sharing your experiences.
> After I insert a file for the user, how do you retrive the file for the
> user? do you insert username and password into the files_Table?
>


just look at the article I've sent you, I think it's explained quite
good

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
create folder/copy file to folder Dorian C. Chalom Microsoft Access Forms 1 11th Aug 2008 12:21 AM
Can't create a new file or folder with in a shared folder on a Windows XP machine. Basic Vista networking questions Nate Goulet Windows Vista Installation 4 18th Apr 2007 10:20 AM
Solution to: Can't create file:.xls. Right click folder you want to create the file in and then click properties on the shortcut menu to check your permissions on this folder Ky_fanatic Microsoft Outlook Discussion 1 8th Dec 2006 06:15 PM
Save file in a new folder, but create folder only if folder doesn't already exist? nbaj2k Microsoft Excel Programming 6 11th Aug 2006 08:41 PM
When I try to open/save .rtf attachment I get the messages ?Can't create file. Right-click the folder you want to create item in and then click on the shortcut menu to check your permissions for the folder.? Nie Geweune via AdminLife Microsoft Outlook Installation 2 28th Jun 2006 05:07 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:16 PM.