0

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?

2 Answers 2

3

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>
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for that. It's a bit hard to be sure when things from older documentation apply at the moment. The joys of new and rapidly changing frameworks :)
1

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.

1 Comment

Thanks very much. As you can see at the bottom of that reference:"If you are using Visual Studio and delete web.config, Visual Studio will create a new one." This isn't true, which confused me. Obviously some parts are out of date. Hard to be sure what. But thanks for your help. Between you and @Daboul I got it!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.