问题
I have a basic Node/Next/React App running on Azure. I read many blogs/threads and everyone say I need to place the web.config
file at the root of my project. I do NOT have this file but everything seems to be running ok so far so here come my questions:
- Is it still required?
- Is it required only for Azure App Service (Windows)?
- Why do I need it?
- What's the purpose of the file?
You can find my repo here: https://github.com/ddon-90/tog-prototype
Thanks in advance
回答1:
A web.config is a configuration file which is used to manage various settings that define a website hosted on IIS sever (typically ASP.NET sites).
There are number of important settings that can be stored in this configuration file. Some of the most frequently used configurations, stored conveniently inside Web.config file are:
Database connections
Caching settings
Session States
Error Handling
Security
Configuration file looks lik
In Azure App Service, app settings are variables passed as environment variables to the application code. For Linux apps and custom containers, App Service passes app settings to the container using the --env flag to set the environment variable in the container
For ASP.NET and ASP.NET Core developers, setting app settings in App Service are like setting them in in Web.config or appsettings.json.
来源:https://stackoverflow.com/questions/59661715/is-the-web-config-file-required-for-a-node-next-react-app-running-on-azure-app-s