简体   繁体   English

本地调试 - 云服务和 Service Fabric 与应用服务

[英]Local Debugging - Cloud Service and Service Fabric vs. App Service

I looked into Azure cloud solutions and came up with below question regarding developing web app locally.我研究了 Azure 云解决方案,并提出了以下有关在本地开发 Web 应用程序的问题。

It seems like, if you develop Cloud Service, you can run locally with Azure emulator, if you develop Azure Fabric Cluster, you can run your cluster locally.看起来,如果你开发云服务,你可以使用 Azure 模拟器在本地运行,如果你开发 Azure Fabric 集群,你可以在本地运行你的集群。

However, if you develop Wep app (part of App service) and you want to debug your app locally, you can either connect remotely your debugger to running web app or run the web app on your local iis.但是,如果您开发 Wep 应用程序(应用程序服务的一部分)并希望在本地调试您的应用程序,您可以将您的调试器远程连接到正在运行的 Web 应用程序或在您的本地 iis 上运行该 Web 应用程序。

Issue is, debug on azure emulator or running on local cluster seems to illustrate running the app on cloud better than develop on your local iis.问题是,在 azure 模拟器上调试或在本地集群上运行似乎说明在云上运行应用程序比在本地 iis 上开发更好。

Am i missing something, or the development experience on App service lacks the option to run locally on "cloud like" environment(excluding the option of remote debug)?我是否遗漏了什么,或者应用服务的开发经验缺乏在“类云”环境中本地运行的选项(不包括远程调试的选项)?

Thanks a lot!非常感谢!

There is no emulator for App Service because at its core it is just an IIS farm (the Windows App Service at least).应用服务没有模拟器,因为它的核心只是一个 IIS 场(至少是 Windows 应用服务)。

We run apps locally on IIS Express + SQL Server 2016 Developer edition, and that corresponds quite well.我们在 IIS Express + SQL Server 2016 开发版上本地运行应用程序,这很好地对应。 Of course if we wanted we could set up an IIS farm locally and use that, but I think that's unnecessary.当然,如果我们愿意,我们可以在本地建立一个 IIS 场并使用它,但我认为这是不必要的。

You can get a bit closer to actual environment if you use the App Service Linux offering, as there you will run everything on Docker containers.如果您使用 App Service Linux 产品,您可以更接近实际环境,因为您将在 Docker 容器上运行所有内容。 So you debug on local Docker and then run it in prod on Docker.所以你在本地 Docker 上调试,然后在 Docker 上的 prod 中运行它。

I would also recommend you to check out deployment slots on App Service, as a staging deployment slot can help you find problems that occur in the cloud environment before you swap it into production.我还建议您查看应用服务上的部署槽,因为暂存部署槽可以帮助您在将云环境切换到生产环境之前发现发生在云环境中的问题。

In my personal experience developing apps for App Service, problems in the production environment were not caused because the environment was very different, but because we overlooked something with the database, made a mistake in a Web.config transform etc.在我为 App Service 开发应用程序的个人经验中,生产环境中的问题不是因为环境非常不同,而是因为我们忽略了数据库的某些内容,在 Web.config 转换中犯了错误等。

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

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