2

I have several controllers that handle file uploads and require large timeouts and files. On the other hand I have several controllers that should execute in a more timely fashion, and would like to take advantage of the security provided by lower maxRequestLength's and executionTimeout's.

I would like to have certain web api controllers or actions be able to set maxAllowedContentLength/maxRequestLength/executionTimeout so that each action or controller can specify it's own requirements.

Is this possible?

j0k
  • 22,600
  • 28
  • 79
  • 90
gmetzker
  • 585
  • 1
  • 8
  • 22

1 Answers1

1

You could break apart the controllers into separate service endpoints all hosted under the same site, but using separate configuration for each.

Kwal
  • 1,531
  • 7
  • 11
  • I'm planning on deploying to Azure WebRole, or AWS Elastic Beanstalk both of which typically allow one deployed site. Is this possible within a single site/deployment item? Is this possible by putting a controller in a separate directory with it's own web.config? – gmetzker Dec 04 '12 at 05:10
  • According to the docs, you should be able to: http://msdn.microsoft.com/en-us/library/windowsazure/gg433110.aspx – Kwal Dec 05 '12 at 21:36
  • @Kwal, how? Please provide a more detailed answer, or at least a link so that users can follow. Because we also have such a requirement, and while your answer is a hope, it's not more than a clue to us. Thank you. – Saeed Neamati Mar 29 '15 at 06:38