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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T08:08:32+00:00 2026-06-02T08:08:32+00:00

Hopefully this is simple. I have a fairly simple ASP.NET (framework version 2) app

  • 0

Hopefully this is simple. I have a fairly simple ASP.NET (framework version 2) app that uses a custom table for user validation. Anyway I have two pages, login and registration. You can guess what the purpose is. The user is supposed to be able to request registration by clicking the registration link – which is a form with a submit button that does some database calls to see if the user is existing and so forth. The login page uses a authentication cookie for verification. I am using forms authentication – this is in my web.config:

    <authentication mode="Forms">
        <forms loginUrl="logon.aspx" name="adAuthCookie" timeout="30" path="/" defaultUrl="~/logon.aspx">
        </forms>
    </authentication>

Every time I do a http call to the registration page (ie by typing in http://localhost/registration.aspx – it redirects to the login page.

The global.asax.cs file has this in there – it’s an authentication check. I want to disable this check if the requesting page is the registration page – since users do not need to be authenticated to visit this page. Any ideas how to do this?

void Application_AuthenticateRequest(object sender, EventArgs e)
{
    string cookieName = FormsAuthentication.FormsCookieName;
    HttpCookie authCookie = Context.Request.Cookies[cookieName];

    if (null == authCookie)
    {
        //There is no authentication cookie.
        return; // right here it will return null then redirect to login.aspx
    }
    FormsAuthenticationTicket authTicket = null;
    try
    {
        authTicket = FormsAuthentication.Decrypt(authCookie.Value);
    }
    catch (Exception ex)
    {
        //Write the exception to the Event Log.
        return;
    }
    if (null == authTicket)
    {
        //Cookie failed to decrypt.
        return;
    }
    //When the ticket was created, the UserData property was assigned a
    //pipe-delimited string of group names.
    string[] groups = authTicket.UserData.Split(new char[] { '|' });
    //Create an Identity.
    GenericIdentity id = new GenericIdentity(authTicket.Name, "LdapAuthentication");
    //This principal flows throughout the request.
    GenericPrincipal principal = new GenericPrincipal(id, groups);
    Context.User = principal;
}
  • 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-02T08:08:34+00:00Added an answer on June 2, 2026 at 8:08 am

    You can configure access in your web.config. Here’s an example of what I would do:

    <location path="register.aspx"> //path here is path to your register.aspx
        <system.web>
            <authorization>
                <allow users="*"/> // this will allow access to everyone to register.aspx
            </authorization>
        </system.web>
    </location>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have this simple PHP loop that is generating html table data with
hopefully this is a simple question. I have a simple custom forum on my
Hopefully this is very simple. I have a central activity that can be launched
Hopefully this is simple: I have a relatively long list where each list item
New to MVC, so hopefully this will be pretty simple. I have an HTML
This is hopefully a simple question: I have an OpenGL texture and would like
hopefully a pretty simple question this time. I have a Select method in a
Hopefully this is a simple question and I have just overlooked something somewhere... I
Hopefully this question has a simple answer i'm overlooking! I have an IIS webserver
Hopefully this is a pretty simple question for someone to answer. I have 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.