473,387 Members | 1,515 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to share a folder

Hi Everyone,
How can I share a folder in ASP? I know how to create / delete folder using File System Object but can't figure out how to share a folder / files. Thanks.
Jan 24 '09 #1
9 2544
Anyone please. I am creating a system where users can create /delete folders. How to write code so that they can share their folders & its contents with others? Any hint please. Thanks.
Jan 25 '09 #2
jhardman
3,406 Expert 2GB
Maybe you could explain a little bit more. Does everyone have access to a newly created folder and you are trying to restrict access? If I was creating the folders and files I believe the method I use makes them freely available. If this is your problem, I would use a db-based login to determine who has access to a given file or folder.

When a file is created is it only available to the user who created it? If that is the case then I don't even know how you made the file - unless possibly by creating it from the account of a windows integrated log-in user.

Let me know and I will try to find a better solution.

Jared
Jan 26 '09 #3
Jared, Thxs for reply. Its a file mangement system I have created. Where a user once he login to the system, there is a folder created for his username. Now in this folder he can create sub-folder / delete them. HE can also uplaod files in to these sub folders. This part I have done.
Now how can I make sure (in ASP) that If he wants to share a particular folder & files in it with other user? I mean The shared folder could be accessbile to other users of the system, who would login to the system using their username & password & then will be able to access that particular SHARED FOLDER & FILES in it. I hope I am clear this time.
Jan 26 '09 #4
jhardman
3,406 Expert 2GB
I think I understand what you are saying, but I'm not sure how it is realized. Why is it that a given user doesn't have access to a different user's files? How do you prevent a user from seeing other user's files? This is the part I don't understand. I only change user permissions from the server, and I wouldn't know how to restrict a user from seeing other files (at least not without putting them in a restricted folder) so I'm not sure how you do it. Without understanding how you restrict user access, I don't see how I could help provide a solution.

If it was up to me, I would have the whole thing based on a database rather than in the file system.

Jared
Jan 26 '09 #5
Jared, Each user when login to the system, with his username & password, then a FOLDER is created in the root of my application with his USERNAME. e.g if my username is KASHIF so a folder with my name will b created & likewise for other users. Now every user can upload files into there respective folders , can create subfolders & so on. So every user has a seperate folder in which he is uploading files & downloading them. What I want is if I create a folder e.g PDFDOCS & upload few files in to it & want to share this folder with other users of the system, how can I do that?s othat other users of the system can see my SHARED folder & files in it. they can downlaod my shared files .....
Jan 26 '09 #6
jhardman
3,406 Expert 2GB
@kashif73
Yes, you said that already. What I am asking is: "how do you prevent someone now from seeing someone else's files?" Are they just not given a link? When someone logs in are they automatically redirected to their own private folder? Do you have complex user permissions set up for each folder preventing any user but the creator to see those files? Any solution will have to take into account whatever method you used for preventing someone from seeing someone else's files.

A database solution might still be the best regardless. When someone makes a shared file, instead of saving it to the private directory, you could save it to a database (most dbs have a "blob" or "binary" datatype) and another linked table could list users who have access to a given file. When someone logs in, if their name is on the list of shared files, they should be given links to see the shared files.

Jared
Jan 26 '09 #7
YES the uers are automatically redirected to their private folders on login.
Thxs for the DB suggestion, I'll look into this option.
Jan 26 '09 #8
jhardman
3,406 Expert 2GB
@kashif73
If there are no user permissions in place preventing the user from seeing other folders, than another simpler db approach might be helpful. When you, Kashif, give permission for another user to access a file, add a reference to it in the db. eventually the db would look like this:
user fileName filePath
John Expenses \kashif\pdfdocs\Expenses.pdf
Fred Expenses \kashif\pdfdocs\Expenses.pdf
Jan Expenses \kashif\pdfdocs\Expenses.pdf
John Receipt History \kashif\pdfdocs\receipts.pdf

Then when John logs in, a script could check the db for any files beyond his own that are available to him, and display them - it would show him that he can have access to Expenses.pdf and receipts.pdf and provide links to access those files, but if Fred logs in, he only sees Expenses.pdf plus his own files and if Terry logs in he doesn't see any files but his own. This way you wouldn't have to save the file to the db, just put a reference to it there. Does this make sense?

Jared
Jan 26 '09 #9
Yes it does make sense:). Thanks this approach seems a very good option I believe. Thanks for your patience & help. Now I have something to work on.
cheers.
KR
Jan 26 '09 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Dave | last post by:
I have an application where I am providing the user the ability to select or create a folder on a domain, using SHBrowseForFolder. When the user selects/creates a folder on a remote computer, it...
1
by: brian.oneil2 | last post by:
Is there a way to install this onto a network file share and allow a team to access it? I would say share a CD from a networked CD drive, but there are multiple CD's that would have to be inserted....
2
by: flat_ross | last post by:
Hi, I am in a shop where developers are required to work off of a network share. This is so that code is backed up nightly. So I am testing running an ASP.NET Web application with a Class...
11
by: ASP.NET User | last post by:
Hi I am in a shop where developers are required to work off of a networ share. This is so that code and other documentation is backed up nightly. This is outside the realm of Visual SourceSafe...
4
by: | last post by:
Hi, Im running IIS and all my data is stored on a network share e.g \\10.0.0.111\domain.com\main The problem i'm facing is that i dont know how to point my aspx.vb files to any dlls in the bin...
4
by: Jeremy S. | last post by:
We're in the process of writing a new Windows Forms app and the desktop support folks want for it to be run from a network share. I know it's possible (i.e., just have the framework on the clients...
3
by: Michel Smit | last post by:
Hello, I have a question. We have a webserver in a domain, DomainA, and a webserver in a DMZ with local users and groups only. I'm trying to copy a file from the DomainA webserver to the DMZ...
2
by: Bill Fallon | last post by:
I have a VS2005 VB.Net windows form application deployed to a share drive. The windows explorer security permissions for this application (.exe) file is set for Everyone with List Folder/Read Data...
0
by: Steve | last post by:
Hello- Platform: - web server using IIS 6 connecting to UNC share on separate file server - Both servers are Windows 2003 with dotNetFramework 2.0 General: - basic ASP.NET pages work fine...
2
by: RN1 | last post by:
Can more than one application (on the same server) share the same Global.asa file? If not, then why? Thanks, Ron
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.