【发布时间】:2017-11-01 17:55:48
【问题描述】:
我正在为我的 MVC Web 应用程序使用 VSTS 和 Azure 来学习 CI/CD。构建成功,部署(到 Azure 中的特定插槽)成功,但是当我导航到 Web 应用程序 URL 时,我仍然看到默认主页。
2017-11-01T17:25:09.6208009Z ==============================================================================
2017-11-01T17:25:09.6218009Z Task : Azure App Service Deploy
2017-11-01T17:25:09.6218009Z Description : Update Azure WebApp Services On Windows, Web App On Linux with built-in images or docker containers, ASP.NET, .NET Core, PHP, Python or Node based Web applications, Function Apps, Mobile Apps, Api applications, Web Jobs using Web Deploy / Kudu REST APIs
2017-11-01T17:25:09.6218009Z Version : 3.3.19
2017-11-01T17:25:09.6218009Z Author : Microsoft Corporation
2017-11-01T17:25:09.6218009Z Help : [More Information](https://aka.ms/azurermwebdeployreadme)
2017-11-01T17:25:09.6218009Z ==============================================================================
2017-11-01T17:25:13.2363661Z Got connection details for Azure App Service:'rsbi'
2017-11-01T17:25:22.3031769Z [command]"C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -verb:sync -source:package='d:\a\r1\a\myapp-ASP.NET (PREVIEW)-CI\drop\myapp.zip' -dest:auto,ComputerName='https://myapp.scm.azurewebsites.net:443/msdeploy.axd?site=myapp',UserName='********',Password='********',AuthType='Basic' -setParam:name='IIS Web Application Name',value='myapp' -enableRule:AppOffline -enableRule:DoNotDeleteRule -userAgent:VSTS_945126af-40d2-8ab2-c875fd19e0af_release_1_1_1_1
2017-11-01T17:25:23.2157103Z Info: Using ID '8cb6f243-2593-4653-abd3-6666df1d45d4' for connections to the remote server.
2017-11-01T17:25:41.2558582Z Info: Adding ACL's for path (myapp)
2017-11-01T17:25:41.2558582Z Info: Adding ACL's for path (myapp)
2017-11-01T17:25:41.3594685Z Total changes: 2 (0 added, 0 deleted, 2 updated, 0 parameters changed, 0 bytes copied)
2017-11-01T17:25:41.3714688Z Successfully deployed web package to App Service.
2017-11-01T17:25:45.0533462Z Successfully updated deployment History at https://myapp.scm.azurewebsites.net/api/deployments/11509557141986
2017-11-01T17:25:45.0703260Z ##[section]Finishing: Deploy Azure App Service to Slot
2017-11-01T17:25:45.0793254Z ##[section]Finishing: Release
如果我查看 Kudu 中的 Web App 调试控制台,我可以看到我的所有内容都已部署:
11/01/2017 05:25 PM <DIR> .
11/01/2017 05:25 PM <DIR> ..
11/01/2017 02:12 PM <DIR> bin
11/01/2017 02:12 PM <DIR> Content
11/01/2017 02:12 PM <DIR> ExternalAssemblies
11/01/2017 02:12 PM <DIR> fonts
11/01/2017 02:12 PM <DIR> Scripts
11/01/2017 02:12 PM <DIR> Views
11/01/2017 10:31 AM <DIR> webapps
11/01/2017 02:11 PM 7,293 ApplicationInsights.config
11/01/2017 02:11 PM 32,038 favicon.ico
11/01/2017 02:11 PM 114 Global.asax
11/01/2017 02:11 PM 6,432 Web.config
6 File(s) 50,508 bytes
9 Dir(s) 53,635,162,112 bytes free
D:\home\site\wwwroot>
【问题讨论】:
-
我不完全确定为什么您网站上的默认页面会显示“此基于 Java 的 Web 应用程序已成功创建”的消息。你不是在部署 ASP.NET MVC 应用吗?
-
我是。这也是让我感到困惑的地方。如果我直接从 Visual Studio 发布到 Azure Web 应用程序,一切都会按预期工作。
-
为了好玩,您能否进入 WebApp 的应用程序设置刀片并确保 Java 版本设置为关闭?
-
我可以试试。但我确实需要刀片上的 java 来运行单独的 Web 作业。
标签: asp.net-mvc azure azure-pipelines-release-pipeline