Reputation: 513
I'm using ASP.NET Core 1.1.2 in VS2017. Currently, I'm just running the server locally on a dev machine.
Lots of the documentation suggests that you can set MaximumRequestLength and RequestTimeout in web.config, but web.config has been removed from the template.
Should I just add my own? Or is there something I should do in the appsettings.json file?
Upvotes: 0
Views: 3098
Reputation: 371
If you're using IIS you can add the web.config file to the project and update it with the required settings. Here's a link to the MS documentation on configuring an asp.net core app, with a blurb about the web.config at the very bottom: https://learn.microsoft.com/en-us/aspnet/core/fundamentals/configuration.
Upvotes: 1
Reputation: 2743
Are you hosting your ASP.NET Core application behind a local IIS? If so, I do believe IIS behavior is still driven by a web.config. For instance, I have mine configured to deal with request < 20 min specifying requestTimeout="00:20:00":
<aspNetCore
requestTimeout="00:20:00"
processPath="%LAUNCHER_PATH%"
arguments="%LAUNCHER_ARGS%"
stdoutLogEnabled="false"
stdoutLogFile=".\logs\stdout"
forwardWindowsAuthToken="false">
<environmentVariables>
<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="staging" /> <!-- value could be "development", "staging" or "production"-->
</environmentVariables>
</aspNetCore>
Upvotes: 3