P
Peter Row
Hi,
To allow users to upload files larger than 4MB in size I added:
<httpRuntime maxRequestLength="102400" executionTimeout="600" />
...to my web.config file. Fair enough this works fine. However how do
I check the maxRequestLength value through code?
Let me set a bit of background. I don't actually have any ASPX pages I have
a DLL written in VB.NET that has various classes, one implements
IHttpHandlerFactory
and the GetHandler function.
If a file is uploaded that is greater than the max size defined then
immediately after the GetHandler
function ends execution stops and the browser displays a "page unavailable"
message. Therefore
what I was planing to do was loop through the Request.Files collection in
the current httpcontext
and destory any file whose contentlength\1024 was > maxRequestLength.
However System.Web.HttpRuntime does not expose this property so how do I get
the value?
Regards,
Peter
To allow users to upload files larger than 4MB in size I added:
<httpRuntime maxRequestLength="102400" executionTimeout="600" />
...to my web.config file. Fair enough this works fine. However how do
I check the maxRequestLength value through code?
Let me set a bit of background. I don't actually have any ASPX pages I have
a DLL written in VB.NET that has various classes, one implements
IHttpHandlerFactory
and the GetHandler function.
If a file is uploaded that is greater than the max size defined then
immediately after the GetHandler
function ends execution stops and the browser displays a "page unavailable"
message. Therefore
what I was planing to do was loop through the Request.Files collection in
the current httpcontext
and destory any file whose contentlength\1024 was > maxRequestLength.
However System.Web.HttpRuntime does not expose this property so how do I get
the value?
Regards,
Peter