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

  • Home
  • SEARCH
  • 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 6931353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:33:57+00:00 2026-05-27T11:33:57+00:00

ASP.NET membership by default redirects user to a login page, however I like to

  • 0

ASP.NET membership by default redirects user to a login page, however I like to handle login from everypage using ajax form that I already implemented.

How can I have membership enabled on my website and also able to access all pages in my website without being redirected to login page.

I’m using C# on visual studio 2010

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-27T11:33:58+00:00Added an answer on May 27, 2026 at 11:33 am

    Although Darin pointed me to a blog that has the correct answer but it is too complex.

    I found an easier method to achieve what I needed. I modifed web.config fie to add a few allowed folders and files. here is how:

    All my Ajax responses are in a single folder like

    /ajax/form1.ajax.aspx
    /ajax/form2.ajax.aspx
    /ajax/form3.ajax.aspx
    

    So I can modify web.config and following rules to it

    in system.web section I added

    <authorization>
      <deny users="?"/>
    </authorization>
    

    this will forbid unauthenticated users from accessing the website
    and in configuration section I add

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

    this will allow unauthenticated users to access defaut.aspx and ajax folder.
    obviously the login form also will be available to users if it is set in system.web -> authentication

    remember to remove the web.config file located in account folder that is overriding the access to folders and files.

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

Sidebar

Related Questions

By default, ASP.NET's membership provider redirects to a loginUrl when a user is not
I've got a membership site using the default ASP.NET membership setup. The user accounts
I am using the default ASP.NET MVC Membership Provider and I would like to
i am extending the default asp.net mvc example.. i am using asp.net membership provider
How can I get the default asp.net membership provider name from code (C#)?
I'm using ASP .NET MVC 2.0 with the default membership provider. How would I
My default role provider from ASP.net universal membership is not creating cookies caching the
I am implementing ASP.NET Membership, using default SQL Provider, default web.config settings. I notice
I have a basic app using the ASP.NET membership provider. By default, you can
I'm using the default ASP.NET profile and membership provider. I want to create a

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.