在Azure中,如何使用Visual Studio部署到生产插槽? [英] In Azure, how to deploy to production slot using Visual Studio?

查看:58
本文介绍了在Azure中,如何使用Visual Studio部署到生产插槽?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试学习如何使用Visual Studio 2015将Web应用程序部署到Azure.我可以成功部署一个简单的Web应用程序(无需创建任何插槽).我移至ARM门户,发现没有任何插槽.但是,当我尝试进行交换时,可以在源&中看到生产"作为选项目的地下拉列表.

I'm trying to learn how to deploy Web Application to Azure using Visual Studio 2015. I could successfully deploy a simple Web Application (without creating any slot). I moved to the ARM portal and found that there isn't any slot. However, when I try to swap, I can see "production" as an option in the source & destination drop down lists.

我创建了另一个插槽,然后尝试再次发布Web应用程序,但是我只能看到一个插槽,它是新创建的插槽(请参见屏幕截图)

I created another slot and then I tried to publish the Web Application again, but I could only see one slot, which is the newly created slot (please see the screen shot)

我有点困惑.根据我的理解,应该有一个默认插槽,可以将其专门部署到该插槽,然后与该插槽进行交换.

I'm a bit confused. According to my understanding, there should be a default slot which I can deploy specifically to it and then swap to/from it.

有什么想法吗?

推荐答案

据我所知,"TestWithDB20170822062605"应用程序是您的默认应用程序.您可以直接选择此网络应用.如果您将应用程序发布到此.它将被视为生产应用.

As far as I know, the "TestWithDB20170822062605" application is your default application. You could directly select this web app. If you publish the application to this. It will be regard as production app.

如果选择TestWithDBSlot2,它将把应用程序发布到您新创建的插槽中.

If select the TestWithDBSlot2, it will publish the application to your newly created slot.

首先,如果选择"TestWithDB20170822062062605"应用程序,VS会将其发布到TestWithDB20170822062605.azurewebsites.net.

Firstly, if you select the "TestWithDB20170822062605" application, VS will publish the application to the TestWithDB20170822062605.azurewebsites.net.

这是根据网址而不是广告位或其他内容.

This is according to the url not the slot or something else.

但是,如果您交换Web应用程序.

But if you swap the web app.

它会这样

TestWithDB20170822062605.azurewebsites.net --------> TestWithDBSlot2

TestWithDB20170822062605.azurewebsites.net --------> TestWithDBSlot2

TestWithDBSlot2.azurewebsites.net ----------->生产

TestWithDBSlot2.azurewebsites.net -----------> Production

因此,您将发现已将应用程序发布到插槽TestWithDBSlot2,但该URL仍为TestWithDB20170822062605.azurewebsites.net.这是根据URL而不是插槽名称.

So you will find you publish the application to the slot TestWithDBSlot2, but the url is still TestWithDB20170822062605.azurewebsites.net. This is according to the url not the slot name.

这篇关于在Azure中,如何使用Visual Studio部署到生产插槽?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆