• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 46
  • Last Modified:

ASP.Net file share between users on website

I have ASP.Net website with several users e.g. A,B,C

and want to share files between user names

currently every user has their own folder for saving files but I want this changed so users can share files (on the server without having to save on network or email)

there's a Administrator
which can should see all files

but A,B,C only see files "shared" to them

how do I do this?
  • 3
1 Solution
You'll have to explain how the system currently works like how file lists are displayed for users etc ., for any meaningful help. Without that we are sort of shooting in the dark. Still ...

Would creating symbolic links on the harddisk (for a share operation) work? If it does it might be the most efficient way

Or you can use a database to store Files information. For example tables like

Files  -> FileId,Filename, OwnerId
FileShares  -> FileId,CanRead_UserId

This should allow you to query the DB and get a list of files a User is able to view.

Alternatively, A NoSQL document DB or even a KeyVal store like Redis can be utilized to implement basic sharing lists.

There are so many possibilities, you'll have to provide more information to refine options.
rwallacejAuthor Commented:
Currently users have a folder asp.net website  with their data which they can access
(Not directly , the code does this )
It lists files for all user 1 by looking at user 1 folder
Same for user 2
Users don't have direct link
It's in app_data folder
Asp.net looks at a user folder and makes a gridview with filenames
Users then click a button
And asp.net reads file todo whatever necessary
I suppose there is code to enumerate files from a user's folder and populate grid. You should try creating symbolic links to files (requires NTFS)


Make a link to a file in user A's folder inside user B's folder, see if that works as expected. If it suits your needs then the easiest path would be to implement sharing using links. When a user shares a file you'll create links in other users' folders.
Np response from OP. Covers most cases
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now