部署

时间:2018-06-07 11:17:19

标签: azure azure-web-sites azure-web-app-service azure-deployment azure-app-service-plans

我在Azure中订阅了一个名为“matanwebserver”的应用服务。这是我正在研究的网站。我使用Visual Studio。

现在我在同一订阅上创建了另一个Web应用程序,我将其用作集成站点,以便在发布到生产站点之前测试我的代码。 新Web应用程序的名称是“matanwebservertest”。将我的项目从Visual Studio发布到新的Web应用程序后,当我输入它的URL时,似乎什么也没发生,但它写道“你的应用程序服务应用程序已启动并运行”。

我做错了什么?

添加了一些屏幕截图,以便更好地了解问题

  1. 在Visual Studio中,我右键单击被调用的Web应用程序 “MatanWebServer”并选择“发布”。然后我选择了我的新网络应用程序 刚刚在Azure门户上创建,名为“matanwebserertest”,并发布 成功。
  2. enter image description here

    1. 这是原创(制作)网站。它的地址是 http://matanwebserver.azurewebsites.net
    2. enter image description here

      1. 在发布到matanwebservertest网络应用程序后,我希望看到原始网站的“副本”,但似乎没有任何内容。
      2. enter image description here

4 个答案:

答案 0 :(得分:0)

要在Azure上配置登台和生产环境,请使用内置功能“部署插槽”。请按照以下链接阅读有关部署位置的更多信息。

Documentation to Set up staging environments in Azure App Service

Video Tutorial to setup Azure WebSites - Deployment Slots for Staging Sites

Enabling Deployment Slots To Safely Deploy Applications To Azure App Service

答案 1 :(得分:0)

AFAIK,当通过VS的发布向导将Web应用程序发布到Azure Web App时,您会看到以下类似的日志:

Updating file (brucewebapp01\bin\AspDotNet-MVC-Website.dll)
OR
Adding file (brucewebapp01\Scripts\respond.js)
  

您的App Service应用已启动并正在运行

     

转到Azure门户中的应用程序快速入门指南以开始使用或阅读我们的部署文档。

您的网络应用程序似乎只选择了hostingstart.html默认页面,该页面是在您创建Web应用程序后自动创建的。您的Web应用程序的默认文档如下所示:

enter image description here

正如Joy Wang评论的那样,您最好在matanwebserertest网络应用下检查已部署的内容,并通过KUDU或Azure App Service Editor或FTP将其与生产网络应用下的网页内容进行比较确保您已将正确的Web内容正确部署到测试Web应用程序中的工具。您可以关注的详细信息here

此外,您可以尝试创建一个新的Web应用程序,并通过KUDU或FTP工具手动将本地发布的Web内容复制/拖动到新的Web应用程序(D:\home\site\wwwroot)中,以缩小此问题。

答案 2 :(得分:0)

我遇到了同样的问题,我通过在以下命令中添加命令“ dotnet YourArtifact.dll”来解决此问题:

mywebapp>应用程序设置(配置)>常规设置>堆栈设置->启动命令

Adding startup command to Azure webapp

答案 3 :(得分:0)

如果应用程序版本为.net core 3.1,而发布配置文件为Linux,则“启动命令”应仅为“应用程序”。不是“ dotnet Application.dll”

赞!

启动命令:应用程序

settings image