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 6823385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:46:36+00:00 2026-05-26T21:46:36+00:00

Hello everyone I have a question that I will describe as good as I

  • 0

Hello everyone I have a question that I will describe as good as I can.
I have project that resides in the folder on my server the path for url is like

http://www.domain.com\project now what I am trying to achieve is to have a \project directory be only accessible if user is login. scenario would be the user opens the url http://www.domain.com and he see the login screen if he logins path \project will be accessible if he does not and try’s to go to any file in the direcoty or directory it should give him an error and redirect him back to login screen. I am using MVC3 in my project but I can write the login screen in asp.net web forms.
I am also want to authorization be based in db a table with user logins so when the user logins it validates based on the information in the table. I am not looking for roles or privileges just a straight access to url based on login. If someone can show an example or a code sample on how to achieve this I will be greatly appreciated it.

  • 1 1 Answer
  • 1 View
  • 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-26T21:46:36+00:00Added an answer on May 26, 2026 at 9:46 pm

    In your web.config try this:

    <system.web>
        ... other stuff
        <authentication mode="Forms">
            <forms loginUrl="~/Account/LogOn" timeout="2880" />
        </authentication>
        ... other stuff
    </system.web>    
    ... more stuff
    // secure only one directory [goes at the same level as your standard <system.web>]
    <location Path="Project">
        <system.web>
            <authorization>
                <deny users="?"/>
            </authorization>
        </system.web>
    </location>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello everyone I have converted a project in C# to F# that paints the
Hello everyone i have an question about firefox add-on: How i can get the
Hello everyone I have a question... I'm trying to make my sms faker app,
Hello everyone I have a problem I'll try to describe shortly In our application
Hello everyone I have a problem. I want to do a GridView with a
Hello everyone Masters Of Web Delevopment :) I have a piece of PHP script
Hello everyone, I have some confusion regarding some Win32 API data types and macros
Hello again everyone, This time I have a problem with Intent & Extras. here's
hello everyone I am trying to make a script that steps through a list
Hello everyone, I am making a VC++ 2008 project in pure Win32 API which

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.