c# - 共享 1 个网站和 1 个 Web API 的 Azure 应用服务

标签 c# asp.net azure asp.net-web-api

我试图弄清楚是否可以为两个不同的项目共享 1 个“Azure 应用服务”(因此同时运行):

  • 1 个 .NET 4.5 网站 (MVC5)
  • 1 个 .NET 核心 WebApi

或者一项 Azure 应用服务是否仅限于一个网站/webapi?

PS:我知道我可以混合使用 WebApi Controller 和 MVC Controller ,但我无法将这两个项目合并为一个 .NET 4.5 或一个 .NET core 项目

最佳答案

是的,您可以在一个应用服务计划上托管多个应用。您的应用程序甚至可以运行不同的堆栈,例如三个 Node 站点、两个 ASP.NET MVC5 站点和 1 个 PHP API。

来自https://learn.microsoft.com/en-us/azure/app-service/azure-web-sites-web-hosting-plans-in-depth-overview :

Web Apps, Mobile Apps, API Apps, Function Apps (or Functions), in Azure App Service all run in an App Service plan. Apps in the same subscription, region, and resource group can share an App Service plan.

All applications assigned to an App Service plan share the resources defined by it. This sharing saves money when hosting multiple apps in a single App Service plan.

关于c# - 共享 1 个网站和 1 个 Web API 的 Azure 应用服务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44334862/

相关文章:

asp.net - 如何在 ASP.NET MVC 中获取 RoleID

azure - Serilog 在 Azure Application Insight 中记录消息的一部分

azure - 如何设计采用文本文件、csv 或任何其他自定义文件并将其加载到 AZURE DB 表中的组件

javascript - 无法在 jqGrid 中格式化日期

c# - 如何使用 Linq 对一些属性进行乘法和求和

asp.net - 是否可以并行运行 iis6 和 iis7?

Azure Application Insights 将响应代码零标记为成功

c# - 转义 sql 字符串的简单方法?

c# - 为字符串抛出什么异常类型

c# - 从 asp.net 在服务器端打印 .NET