-
Notifications
You must be signed in to change notification settings - Fork 10.3k
This server does not support the IHttpRequestBodySizeFeature #8293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Are you using IIS In-process? If so, we may have a feature gap there. So yes, you can set limits on the request body length via https://docs.microsoft.com/en-us/iis/configuration/system.webserver/security/requestfiltering/requestlimits/ and setting in your web.config, but that isn't ideal. We probably should add it to InProcess. Can you try running out-of-process and see if the feature exists there? |
Bummer :/ Yea, I'm using in-process. I'll evaluate whether it's best for me to switch to out-of-process or use web.config limits. Do you have any plans on adding support for that on in-process scenarios? |
I feel like this was just an oversight. We can evaluate how hard this would be to do in IISInprocess and try to put it into 3.0. |
We should do this, the web.config settings are not granular enough. @blowdart |
Yes you should. |
We have the same problem. We are hosting In-Process in Azure. |
There is a RequestSizeLimit that is part of IIS: https://docs.microsoft.com/en-us/iis/configuration/system.webserver/security/requestfiltering/requestlimits/. I'm fairly certain this is used when hosting in Azure (not sure what the value is on top of my head). The RequestSizeLimitAttribute can't be used when hosting with IIS today though, so you would need to know which server type you are deploying for. I'm going to start working on a fix for this now though. |
I see this is closed, but am under impression this is where I would ask. We are experiencing this issue on Azure hosting with Asp.Net Core 2.2. We are hosting In-Process in Azure and using the Similar question as @zuckerthoben, is there a workaround and or is this attribute deprecated however it works under the hood? |
@AFDevMike it wasn't supported for 2.2 in-proc. It will be supported in 3.0. The workaround is to use out-of-proc. |
Acceptance checklist (check one item)
|
Uh oh!
There was an error while loading. Please reload this page.
I have an MVC action decorated with
RequestSizeLimitAttribute
. However, I'm seeing the following message in my logs every time I hit that route:A request body size limit could not be applied. This server does not support the IHttpRequestBodySizeFeature
.I'm running ASP.NET Core 2.2 with IIS on Windows Server 2016.
I couldn't manage to find not even a single mention of this in Google. I'm guessing it's because I'm running the app behind IIS. If that's the case, does that mean that only web.config limits are supported?
The text was updated successfully, but these errors were encountered: