Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3457916
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T09:55:07+00:00 2026-05-18T09:55:07+00:00

How can I add limited access to only 1 specific user has access to

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T09:55:08+00:00Added an answer on May 18, 2026 at 9:55 am

    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.

    [Authorize(Users="MyUsername")]
    public ActionResult Banking()
    {
       return View();
    }
    
    [Authorize(Roles="SysAdmin, BusinessOwner")]
    public ActionResult Banking()
    {
       return View();
    }
    

    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:

     <system.web>
    <membership defaultProvider="MyMembership" userIsOnlineTimeWindow="30">
      <providers>
        <clear/>
        <add name="MyMembership" type="MyDAL.MyMembership, MyDAL"/>
      </providers>
    </membership>
    <roleManager defaultProvider="MyRole" enabled="true" cacheRolesInCookie="true">
      <providers>
        <clear/>
        <add name="MyRole" type="MyDAL.MyRole, MyDAL" />
      </providers>
    </roleManager>
    

    Then you create classes that inherit the providers:

    using System.Web.Security;
    
    namespace MyDAL
    {
        class MyMembership : MembershipProvider//[ctrl + .] to create stubs
        {
            //Use Visual Studio to generate all the MembershipProvider stubs [ctrl + .]
        }
    }
    

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my application user can add there reminder for the specific day and reminder
Can someone tell me of a way in which I can add a user
In ADO.NET you can add parameters to a command object to securely add user
I have a UIView that a user can add subviews to. I now need
I can add and remove the last line in my dynamic form and calculate
I can add a normal rightBarButton to my navigation without a problem but now
I can add a Conditional statement to a breakpoint, for instance arg0.startsWith(something) but i'd
We can add an image to an photo album using UIImage *img = [UIImage
I know one can add event listener for window.error. However when working with Iframes,
Users on my site can add nodes of a custom type (let's call it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.