Solved

FormsAuthentication Unexpectedly logged out

Posted on 2011-09-29
8
240 Views
Last Modified: 2012-05-12
I have .Net 3.5 site hosted with webhost4life. I don't use any session variables.

I use the asp.net login control to log in. Attached is my web.config. I can see the cookie is created on my machine and has a expiry time of + 8 hours.

I know that the application pool recycles with webHost4life. Is this what logs me out?
<authentication mode="Forms">
      <forms 
		  loginUrl="Login.aspx" 
		  defaultUrl="uiWelcomeScreen.aspx"
		  protection="All" slidingExpiration="true" cookieless="UseCookies"
		  timeout="498" 
		  path="/">
      </forms>
    </authentication>

Open in new window

0
Comment
Question by:Eamon
  • 4
  • 3
8 Comments
 
LVL 74

Assisted Solution

by:käµfm³d 👽
käµfm³d   👽 earned 100 total points
ID: 36816830
If the app pool recycles, then you would lose that value, yes. The app pool is just like an application: it has some state, and if you restart it, that state is reset to its initial values.
0
 
LVL 12

Expert Comment

by:Ramkisan Jagtap
ID: 36816838
If u have used cookies and expiry time is of 8 hrs. Then It must be happening due to application pool recycling.
0
 
LVL 1

Author Comment

by:Eamon
ID: 36818506
My application pool seems to be recycling on average every 5 minutes even if it is not idle. I opened a support ticket with them but no real joy.

I suppose my next question is - who do you recommend? I've heard good things about discountasp.
0
 
LVL 12

Expert Comment

by:Ramkisan Jagtap
ID: 36871183
You can go to GoDaddy.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 1

Author Comment

by:Eamon
ID: 36890238
One last thing:

Is there anything I can check to make sure it is because of the application pool recycling?
0
 
LVL 12

Accepted Solution

by:
Ramkisan Jagtap earned 400 total points
ID: 36890377
You can pulish the application on a local server and check it
0
 
LVL 1

Author Comment

by:Eamon
ID: 36890516
I did that.

Strange thing is, I recycled my application pool manually by right clicking and selecting Recycle in my local IIS and it didn't log me out.

I am using IIS7 and my hosted application uses IIS6.

I'm baffled now. Any ideas?

0
 
LVL 1

Author Closing Comment

by:Eamon
ID: 36924445
In the end I moved hosting company and all is working as it should on my new hosting company.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now