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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T01:15:49+00:00 2026-06-03T01:15:49+00:00

I want to allow anonymous users to browse only few files like default.aspx, aboutus.aspx,

  • 0

I want to allow anonymous users to browse only few files like default.aspx, aboutus.aspx, contactus.aspx etc. Is there a way to write all these file names in one place or I will have to repeat the below code again and again for all the files?

<location path="Default.aspx">
<system.web>
  <authorization>
    <allow users="*"  />
  </authorization>
</system.web>

  • 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-06-03T01:15:51+00:00Added an answer on June 3, 2026 at 1:15 am

    It is not possible to specify multiple paths in a single location element. I think you are asking to do is something like this:

    <location path="Default.aspx,aboutus.aspx,contactus,aspx">
        <system.web>
            <authorization>
                <allow users="*"  />
            </authorization>
        </system.web>
    </location>
    

    Unfortunately, I do not believe that is possible.

    You have several options for how to do this.

    A) specify the location element multiple times, one for each file that you want to allow anonymous access:

    <location path="Default.aspx">
        <system.web>
            <authorization>
                <allow users="*"  />
            </authorization>
        </system.web>
    </location>
    <location path="aboutus.aspx">
        <system.web>
            <authorization>
                <allow users="*"  />
            </authorization>
        </system.web>
    </location>
    <location path="contactus,aspx">
        <system.web>
            <authorization>
                <allow users="*"  />
            </authorization>
        </system.web>
    </location>
    

    B) Put all of the files that you want to allow anonymous access to in a separate directory, as Admirer mentioned above.

    C) You may wan to explore using File Authorization instead of URL authorization. With File Authorization, you can assign windows ACL permissions directly to files. It might be possible to assign files you want protected to one Windows account, and files that you want to allow anonymous access to another ACL account. You task would then be to use ASP.Net impersonation to map requests from anonymous access requests to execute in the security context of the windows account that has access only to the un-protected files, and map requests from authenticated requests to the windows account that has access to all files.

    I am not sure you want to go down this road, since it is probably much easier simply to replicate the “location” element multiple times, once for each resource you want to expose to anonymous access. But if you do want to look into this, there are some good resources here or here

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

Sidebar

Related Questions

What I want to do is: Allow anonymous users to access my ASP .NET
I have a directory with PHP files I do not want anonymous users to
In my web application I want the anonymous user to browse only the login
I want to allow the interface to change only if the flag enableRotation=1. I’ve
I want to allow uploads of very large files into our PHP application (hundred
I want to allow users of my application to add sub-users and set privileges
I want to allow only English characters to be typed in my asp:TextBox (in
I want to allow a user to drag my Win32 window around only inside
I want to allow user to enter only english alphabets and characters. How can
I'm working on a web-based contest which is supposed to allow anonymous users to

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.