How can I add limited access to only 1 specific user has access to 1 specific directory and none else can access it than him? I’ve looked at the web.config thing but that wont work.
So basically what I’m trying to is:
Person creates user => new user => new directory (access ONLY for the new user and none else).
Thanks in advance.
The application I am currently working on uses the Authorize decoration in conjunction with the membership and role providers (both custom) to manage access to pages within my MVC site e.g.
I find this is extremely flexible as you can have public (no decoration) any logged in user [Authorize] or roles & users. Personally I would never build an app that authorized on Users – Roles is a much more extensible option (even if it does only contain one user at the moment) there are two main reasons I wouldn’t do this – Users becomes unwieldy in a big app and secondly adding a user to the decoration requires a recompile/redeploy of the app whereas associating a user to a role in most situation is typically a database association that the app’s business logic handles at runtime.
In your web.config you set up something similar to this to use the custom providers:
Then you create classes that inherit the providers:
You will end up with a bunch of methods with throw new NotImplementedException() – there are heaps of these but it is not necessary to fill them all out – just complete the ones that are relevant to your application and leave the rest as is.