Tuesday, May 24, 2011

The history of networks


What is HTTP 418 ERROR?

:)

http://en.wikipedia.org/wiki/Http_status_codes#4xx_Client_Error

How to solve problem “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.”


How to solve problem “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.”

Reason: 
Usually do not close its associated connection when use a DataReader.


Three ways to solve:
1 SqlDataReader sdr = sCmd.ExecuteReader(System.Data.CommandBehavior.CloseConnection);

2 Explicitly close the connection
sc.Close();

3 Using block
using (SqlConnection sc = new SqlConnection(connString))
{
SqlCommand sCmd = new SqlCommand("SELECT * FROM Shippers", sc);
sc.Open();
Console.WriteLine("Conns opened " + i.ToString());
SqlDataReader sdr = sCmd.ExecuteReader();
sdr.Close();
}



ASP.NET MVC 3 Filters

ASP.NET MVC 3 Filters

Unleashing ASP.net Calendar Control

Microsoft Programmers | Unleashing ASP.net Calendar Control