To allow large file upload, below config is required in web.config plus other api level configs if any.
.NET 5/Core doesnt have web.config at the time of development.
Is there any way to write below config to web.config via azure devops pipelines / any automated way ? direct configuration in the azure app service is not an options we deploy the code many times in a week.
<configuration>
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="500000000" />
</requestFiltering>
</security>
<system.webServer>
CodePudding user response:
Initially .NET 5/Core doesnt have web.config at the time of development , but after deployment web.config will be generated in your Azure App. You can view your files in Portal.
- In the Azure Portal, navigate to the web app.
- In the App Service blade, enter kudu in the search box.
- Select Advanced Tools > Go.
- Select Debug console > CMD.
- Navigate to site/wwwroot
- Select the pencil icon to edit the web.config file.
CodePudding user response:
To edit your web.config
in your CI/CD pipeline, I would recommend taking a look at the File Transform task
, which uses XML transformations.
XML transformations are a pain in my opinion, however, so you could also opt for doing a simple file overwrite using Powershell if you just want to set your web.config
to the contents above.
Also - why not just include the web.config
file in your repository? That way, you won't need any CI tasks if you just want a static file & it'll work as expected.