rwallacej
asked on
ASP.net - automatically give user their own directory
Hi
How can I automatically create a user folder to which only they and the system administrator have access on creating user. Users will have their own "private space" to save files.
Only the administrator should have access to the createuser.aspx page - then as part of the creating new users it should create a folder matching their user name, like
e.g. www.xxx.com/data/user1
where the username is user1
This would be better than having to create usre then manually create their folder/give permissions
Thanks!
How can I automatically create a user folder to which only they and the system administrator have access on creating user. Users will have their own "private space" to save files.
Only the administrator should have access to the createuser.aspx page - then as part of the creating new users it should create a folder matching their user name, like
e.g. www.xxx.com/data/user1
where the username is user1
This would be better than having to create usre then manually create their folder/give permissions
Thanks!
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
ok thanks I think this code will work.
I'm not sure how the permissions are handled, though, in this code ?- only the user should have access to the folder they have created and its contents - no other users can get at the folder (apart from administrator)
I'm not sure how the permissions are handled, though, in this code ?- only the user should have access to the folder they have created and its contents - no other users can get at the folder (apart from administrator)
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
thanks for help, I now have the code creating a user folder
however, despite looking at security namespace I can't find out how to grant permissions to folder - further assistance appreciated, thanks
however, despite looking at security namespace I can't find out how to grant permissions to folder - further assistance appreciated, thanks
Hi,
Are we talking about Active Directory users?
Jos ter Doest
Are we talking about Active Directory users?
Jos ter Doest
ASKER
not sure I understand. I'm talking about giving users who I have registered using a page with the ASP.net create user control on it. These users will be able to login from internet - not local intranet users.
I have got the creation of user directory working but not the bit that gives the user just created (and them exclusively + administrator) access to the new directory
Thanks
I have got the creation of user directory working but not the bit that gives the user just created (and them exclusively + administrator) access to the new directory
Thanks
Hi,
That's exactly what I meant (not local intranet users). Since they are not local intranet users I would not know how to give them folder permission. I will google for it but I'm not sure I'll find anything.
I think you need to look at a way of redirecting users away from a folder that does not belong to them.
I'll come back to you in case I've found something.
Jos ter Doest
P.S. For folder permission take a look here
https://www.experts-exchange.com/questions/22931714/Set-File-Folder-permissions.html?sfQueryTermInfo=1+folder+permiss+vb.net
That's exactly what I meant (not local intranet users). Since they are not local intranet users I would not know how to give them folder permission. I will google for it but I'm not sure I'll find anything.
I think you need to look at a way of redirecting users away from a folder that does not belong to them.
I'll come back to you in case I've found something.
Jos ter Doest
P.S. For folder permission take a look here
https://www.experts-exchange.com/questions/22931714/Set-File-Folder-permissions.html?sfQueryTermInfo=1+folder+permiss+vb.net
ASKER
thank-you,
I would have thought you were able to set folder permissions programmatically, rather than having to go through the ASP.net web configuration pages...but maybe you can't
I would have thought you were able to set folder permissions programmatically, rather than having to go through the ASP.net web configuration pages...but maybe you can't
Hi,
Of course it is possible to set folder permissions programmaticly, but I thought your users are "website users" stored in a database instead of domain users.
So, for setting up folder permissions for domain users check my previous post.
Grtz, Jos
Of course it is possible to set folder permissions programmaticly, but I thought your users are "website users" stored in a database instead of domain users.
So, for setting up folder permissions for domain users check my previous post.
Grtz, Jos
ASKER
The users are "website users" stored in the ASPNETDB.MDF folder
I might resort to creating user folder/ setting folder permissions through Website--ASP.net configuration if its not simple to programmatically do the setup for permissions on adding a new user to ASPNETDB.MDF
I might resort to creating user folder/ setting folder permissions through Website--ASP.net configuration if its not simple to programmatically do the setup for permissions on adding a new user to ASPNETDB.MDF
ASKER
thank-you
ASKER
could you please translate to vb.net?
how does this handle user permissions ?
thanks