简体   繁体   English

在Azure Service Fabric上托管MVC应用

[英]Host MVC app on Azure Service Fabric

Looking into options for starting the migration of an existing application with both MVC web pages and Web Api components to Service Fabric. 寻找用于开始将具有MVC网页和Web Api组件的现有应用程序迁移到Service Fabric的选项。 We have gotten the Web Api components running under ServiceFabric, but not the MVC web pages. 我们已经获得了在ServiceFabric下运行的Web Api组件,但没有在MVC网页下运行。 Based on what little I have seen out there, there does not seem to be a definitive way to run an existing MVC application under service fabric. 根据我所看到的内容,似乎没有确定的方法可以在服务结构下运行现有的MVC应用程序。 Is this correct or am I missing something? 这是正确的还是我错过了什么? NOTE - by MVC app, I mean a web site built using MVC 6, not Web API services. 注意-通过MVC应用程序,我的意思是使用MVC 6构建的网站,而不是Web API服务。 Thanks in advance. 提前致谢。

Yes you can take an MVC 6 application and run it on Service Fabric. 是的,您可以使用MVC 6应用程序并在Service Fabric上运行它。 Here is an example from the official Azure Sample gallery: https://github.com/Azure-Samples/service-fabric-dotnet-iot/tree/master/src/Iot.Tenant.WebService 这是来自官方Azure示例库的示例: https : //github.com/Azure-Samples/service-fabric-dotnet-iot/tree/master/src/Iot.Tenant.WebService

If you are planning to develop new application then you can follow below link service-fabric-add-a-web-frontend 如果您打算开发新的应用程序,则可以按照以下链接service-fabric-add-a-web-frontend

IF you have an existing application you and you don't want to change any code you can deploy your application as Guest executable. 如果您具有现有应用程序,并且不想更改任何代码,则可以将应用程序部署为Guest可执行文件。 follow below link service-fabric-deploy-existing-app 按照下面的链接service-fabric-deploy-existing-app

If you have an existing application (MVC 5 and IIS based) and you want to deploy in Service Fabric you and host with help of container. 如果您有一个现有应用程序(基于MVC 5和IIS),并且想要在Service Fabric中进行部署,则可以在容器的帮助下进行托管。 MVC5 app does not support self-host and tightly coupled with IIS. MVC5应用程序不支持自托管,并且与IIS紧密耦合。 check below link iis-based-applications-to-service-fabric-using-docker-container 检查以下链接基于iis的基于iis的应用程序到服务织物使用docker容器

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

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