How do I set maxAllowedContentLength value per action?
I have a few actions that used to upload files, each one needs a different maxAllowedContentLength value.
It make sense that we don't want to use action filters as we want to filter this request at IIS level. On the other hand, action filter is the best solution from coding perspective, as they coming after the routes, so I the routes change, it continue work.
In IIS6 I know we can use <location>
tag to specify maxRequestLength
to a specific location.
I don't know how to use this approach on IIS7, and I don't like this approach, since the url routes are hand coded in the web.config.
What is the best solution to solve this problem?