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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:01:23+00:00 2026-05-26T19:01:23+00:00

It seems I was not expressing my question well, so I am adding this

  • 0

It seems I was not expressing my question well, so I am adding this as a supplemental title: How can I extend the FormsAuthentication class so that I can override default behaviors in a configuration file (for example, pass off execution control to the MembershipProvider for updating the MembershipUser’s LastActivity on a new page request), and, failing that, replace the mechanism of the FormsAuthentication class with my own custom class and use that as the FormsAuthentication class would normally be used?

How do we implement a less ridiculously rigid, more extensible FormsAuthentication framework that will allow us to integrate into a custom MembershipProvider? Has there been any work on this? Ultimately, I’d like to put in my web.config something like this:

<authentication mode="Forms">
    <forms membershipProvider="MyCustomMembershipProvider">
        <events>
            <add event="AuthenticatedRequest" action="OnAuthRequest" />
            <add event="UnAuthenticatedRequest" action="OnRequest" />
            <add event="UnAuthorizedRequest" action="UnAuthRequest" />
        </events>
    </forms>
</authentication>

This shouldn’t be taking up all my time. The Forms Authentication seems to be pretty low-level in the ASP.NET page lifecycle, but there’s got to be a way to cleanly circumvent it.

This is not about the custom membership provider. I want to implement things in my membership provider class like the implied “IsOnline” and “LastActivity” functionality, but the FormsAuthentication sets the cookie and doesn’t look back. I want to inject my own code when it checks that cookie, but I can’t. There has to be a way other than layering my own cookie on top.

  • 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-26T19:01:23+00:00Added an answer on May 26, 2026 at 7:01 pm

    No, it doesn’t work that way. The membership provider doesn’t get authenticated requests or unauthenticated requests. In fact, it has very little to do with authentication. That’s handled by the security framework. Membership is only used as the means to validate someones username and password. That’s it. You can think of Membership as a data store that the security framework uses to authenticate the user, but it does not do the management of the authentication itself.

    This article might be what you’re looking for:

    http://www.asp.net/security/tutorials/forms-authentication-configuration-and-advanced-topics-cs

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

Sidebar

Related Questions

I've found a similar question on SO , however, that seems not exactly what
This seems like an obvious question but there does not appear to be an
I thought it was alias for simple foreign key relation ,but seems not. Can
Right now, the text seems not to be exactly vertical centered. It seems that
I found that some result of MBRContains(g1,g2) and other functions seems not right to
This seems like it should have a simple solution but I can't seem to
It would seem that regular expression questions are common as each question seems to
[This question is related to but not the same as this one .] If
This question seems to come up a bit and I've yet to see a
My apologies if my question is not well worded but I seem to have

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.