What is the byte to mb converstion to set MaxRequestBodySize in IISServerOptions

Matthew Dillon 1 Reputation point

We attempted to set IISServerOptions.MaxRequestBodySize to 6MB but this did not work and is preventing files smaller than 6MB from being uploaded. example code below

public static void SetIISServerOptions(ServiceRegistry services)
var sixMegaBytesSize = 6291456;
services.Configure<IISServerOptions>(options =>
options.MaxRequestBodySize = sixMegaBytesSize;

If the conversation is not binary or decimal then what is the byte to mb conversation for MaxRequestBodySize. we are using core 3 and iis7.

A set of technologies in the .NET Framework for building web applications and XML web services.
4,371 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 61,026 Reputation points

    the hander used to process the request may also have max request size setting

    0 comments No comments