Archive for नोव्हेंबर 3rd, 2009

Get Max Request length from web.config

नोव्हेंबर 3, 2009

For retrieving maxrequest length from web.config use following function:

public int GetMaxLength()
{
HttpRuntimeSection httpRuntime =
(HttpRuntimeSection)ConfigurationManager.GetSection("system.web/httpRuntime");
return httpRuntime.MaxRequestLength;
}