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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:01:49+00:00 2026-06-14T15:01:49+00:00

I have a problem related to ASP.NET Membership and Forms Authentication. I have been

  • 0

I have a problem related to ASP.NET Membership and Forms Authentication. I have been searching the solution for this quite long (including the StackOverflow.com), but was unable to find some solution with regards to my scenario. Please help me.

I am using an ASP.NET Membership and Forms Authentication in an application, the problem is that during testing the application for around more than 30 minutes,
the following errors come:-

1) The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.

2) Session does not expires, and it does not redirect to the Login page.

3) Session values are becoming null at few times.

The application is in Production as well, but the client has not reported any of the above such issues yet.

Please find below the Web.config settings:-

<sessionState timeout="30" mode="InProc">
</sessionState>

<membership defaultProvider="SqlProvider" userIsOnlineTimeWindow="20">
    <providers>
        <clear/>
        <add name="SqlProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="DBSQLServer" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" passwordFormat="Hashed" applicationName="/ApplicationPortal"/>
    </providers>
</membership>       

<add name="DBSQLServer" connectionString="Data Source=SERVER-NAME\SQLEXPRESS2008;Initial Catalog=DB-Name;Max Pool Size=100;Trusted_Connection=True;" providerName="System.Data.SqlClient"/>

And not to forget the section:-

<authentication mode="Forms">
  <forms loginUrl="~/Login.aspx" defaultUrl="~/Login.aspx" protection="All" timeout="30">
  </forms>
</authentication>

Although there were few connections which were not disposed off, but now all the connections are properly disposed off.
I found somewhere that by closing the DataReaders, this will be resolved, but since I have disposed off all the connections, so does this effect if the DataReaders
are not closed/disposed in my scenario?

I would also like to know that what possible issues are there which is causing these two errors simultaneously, and how can I fix these two issues.

There has been also inline queries used at many of the pages.

  • 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-14T15:01:51+00:00Added an answer on June 14, 2026 at 3:01 pm

    This all sounds like a poor design.

    1. Make sure you use one connection per request and that you are disposing it in any case (finally block)
    2. When you say session does not expire, have you waited timeout period without making any request for sure?
    3. When your session values are cleared it actually means that session is expired or cleared because IIS worker process was recycled. Tune up worker recycling policy or set up session state in database.
    4. When you are saying session does not redirect to login page – this is wrong. Session has nothing to do with login page. You will be redirected there if you try to reach a page that needs you to be logged in.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am in ASP.NET, but the problem is completely HTML related. I have this
Here is my problem: I have just been brought onto a massive asp.net C#
I am having this problem with my ASP.Net application and I have no idea
I have an ASP.NET site that has been running perfectly for a long time,
I have an asp .net webforms app that uses forms authentication. For a small
I've been experimenting with ASP.Net MVC, and have come across a problem that is
This is a problem is related to worker role hosted VM. I have a
I have read a lot of related topics here regarding this problem but I
I have an ASP.Net 2.0 application that uses integrated Windows Authentication to authenticate/authorize users.
I have a weird problem. My query in C#/ASP.NET returns results 5 times. I

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.