Posts

Showing posts from December, 2017

Timeout expired. 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."

Image
Message from the system: "Timeout expired. 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." Always close your connection in the final block: or Increase pool size like in your connection string  string connectionString = "Data Source=localhost; Initial Catalog=Northwind;" + "Integrated Security=SSPI; Min Pool Size=10; Max Pool Size=100"; Don't use pooling string connectionString = "Data Source=localhost; Initial Catalog=Northwind;" + "Integrated Security=SSPI; Pooling=false;";

Prevent IIS Session Timeout in ASP.NET

Image
There are scenarios that a user may want to keep a long session alive. For example, a help desk operator logs into a web application and takes phone calls and in between submits changes to the backend systems. The phone call may last over an hour and the operator may stay in one web page and need that session to be valid when she submits the changes. In ASP.NET, there are several common simple solutions for that. One of them is to set the session timeout attribute (minutes) in web.config. 1 <sessionState mode ="InProc" timeout="xxx"/> Some people are confused at the timeout setting in web.config and another in IIS and ask which overwrites which. However, this is not complete for ASP .NET 2.0+. Open IIS->Application Pools->Select the Application pool for your application->Advanced Settings, set the idle timeout for xxx minutes". Otherwise, the worker process is still stopped after 20 minutes(default) and your session state wi