S
Sunil.Dua
Hi All,
My machine.config contains the following setting.
<httpRuntime
executionTimeout="90"
maxRequestLength="4096"
useFullyQualifiedRedirectUrl="false"
minFreeThreads="8"
minLocalRequestFreeThreads="4"
appRequestQueueLimit="100"
/>
I want to extract the value for max request length through code in C#.
Few experiment i done are here :-
I tried with
'(NameValueCollection)ConfigurationSettings.GetConfig
(SectionName);
When I try to run 'NameValueCollection httpRun =
(NameValueCollection)ConfigurationSettings.GetConfig
("system.web/httpRuntime");'
I get an Invalid cast exception.
Then i tried with
Hashtable config =
(Hashtable)ConfigurationSettings.GetConfig("customSection");
MessageBox.Show(config["Name"].ToString());
It is also not working.
Can you please suggest me some good and secure solution. asap.
Thanks.
My machine.config contains the following setting.
<httpRuntime
executionTimeout="90"
maxRequestLength="4096"
useFullyQualifiedRedirectUrl="false"
minFreeThreads="8"
minLocalRequestFreeThreads="4"
appRequestQueueLimit="100"
/>
I want to extract the value for max request length through code in C#.
Few experiment i done are here :-
I tried with
'(NameValueCollection)ConfigurationSettings.GetConfig
(SectionName);
When I try to run 'NameValueCollection httpRun =
(NameValueCollection)ConfigurationSettings.GetConfig
("system.web/httpRuntime");'
I get an Invalid cast exception.
Then i tried with
Hashtable config =
(Hashtable)ConfigurationSettings.GetConfig("customSection");
MessageBox.Show(config["Name"].ToString());
It is also not working.
Can you please suggest me some good and secure solution. asap.
Thanks.