简体   繁体   English

在 Azure 应用服务 (Linux) 上运行的 Node/Next/React 应用是否需要 web.config 文件?

[英]Is the web.config file required for a Node/Next/React App running on Azure App Service (Linux)?

I have a basic Node/Next/React App running on Azure.我有一个在 Azure 上运行的基本 Node/Next/React 应用程序。 I read many blogs/threads and everyone say I need to place the web.config file at the root of my project.我阅读了很多博客/线程,每个人都说我需要将web.config文件放在我的项目的根目录下。 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)?是否仅适用于 Azure 应用服务 (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你可以在这里找到我的仓库: https : //github.com/ddon-90/tog-prototype

Thanks in advance提前致谢

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). web.config 是一个配置文件,用于管理定义托管在 IIS 服务器上的网站(通常是 ASP.NET 站点)的各种设置。

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:一些最常用的配置,方便地存储在 Web.config 文件中:

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.在 Azure 应用服务中,应用设置是作为环境变量传递给应用程序代码的变量。 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对于 Linux 应用和自定义容器,应用服务使用 --env 标志将应用设置传递给容器以设置容器中的环境变量

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.对于 ASP.NET 和 ASP.NET Core 开发人员,在应用服务中设置应用设置就像在 Web.config 或 appsettings.json 中设置它们一样。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM