George Vovos
George Vovos

Reputation: 7618

Allow requests of any length per Service

The answer to How to configure the web.config to allow requests of any length works fine.

Is there a way to change the limit for a specific service?
For example something like

<system.webServer>
  <security>
     <requestFiltering serviceName="MyService.asmx">//Only for 1 service
         <requestLimits maxQueryString="32768"/>
     </requestFiltering>
  </security>
</system.webServer>

Upvotes: 1

Views: 112

Answers (1)

George Vovos
George Vovos

Reputation: 7618

Adding a location element and setting the settings there seemed to do the trick

<location path="MyService.asmx">
<system.webServer>
  <security>
    <requestFiltering >
      <requestLimits  maxAllowedContentLength="102400000"/>
    </requestFiltering>
  </security>
</system.webServer>

If there is another/better solution feel free to post it

Upvotes: 2

Related Questions