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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:57:24+00:00 2026-06-17T23:57:24+00:00

I use Form Based Authentication in my site In my login page I have:

  • 0

I use Form Based Authentication in my site
In my login page I have:

FormsAuthentication.SetAuthCookie(user.userName, true)

When I want to check if the user is authenticated I do:

HttpContext.Current.User.Identity.IsAuthenticated

I’m not using Asp.net Membership, instead i use my on SQL-DB verification
do i have to use Asp.net Membership ?

This is working for me most of the times
The problem is that sometimes after 5 hours or something after 30 hours
The Application pool gets restarted for some reason (I’m on a shared server)
And after that the “User.Identity.IsAuthenticated” returns with false, every time until the user logs in again.

This is strange to me because I can see that the client still have the persistent authCookie so why the user is not authenticated ?

My Web.Config reference:

<authentication mode="Forms">
<forms
name="AuthCookie"
loginUrl="~/mySite/ManageLogin.aspx"
timeout="5256000"/>
</authentication>

Any help will be appreciated.

My site http://www.mentallica.co.il

  • 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-17T23:57:25+00:00Added an answer on June 17, 2026 at 11:57 pm

    This may be due to the automatic generation of the machinekey at the application start. You can prevent that by specifying a machinekey for your app in your web.config:

    <machineKey
        validationKey="410E4E2B06BE457709F2D8C72BB02957A3B4E8BA327F3A6103696857AD3A88598D454489B9D4CAAFC2D5E35E8795B311EE2E94DAA485FD64D7184272A4AE4D8B"
        decryptionKey="EFAFA0917D0D8F137F05B26AE053397C48D34DE688E73483D15C8EDAF0D6FD4F"
        validation="SHA1"
        decryption="AES" /> 
    

    You shouldn’t use this one – you may create your own easily at http://aspnetresources.com/tools/machineKey .

    More information about machinekeys: http://msdn.microsoft.com/en-us/library/ff649308.aspx

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

Sidebar

Related Questions

I have a webapp with form-based authentication. On the login page, I have placed
I have configured my application to use form based authentication and set up the
I use FORM-based authentication method in Java JSP/Servlet app. I want to do something
I have spring-security configured using basic and form based authentication as per auto-config='true' .
I would like to use form-based authentication as outlined in the book JavaServer Faces
I would like to use authentication form on every page (in the header of
Here's my situation: I want stuff under mysite/customer/* to require form-based authentication before access
In my JSF 2 I use form based authentication. The web.xml contains a single
Normally you use Form.Visible to check if Window is visible at all. But sometimes
I am designing a secure login with JSP. I intend to use Form Authorization

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.