即使下载了下载的发布配置文件,Web部署到Azure也停止工作

问题描述 投票:1回答:1

昨天从Visual Studio 2017到我的Azure Web应用的“我的Web部署发布”一直很挑剔,今天才完全停止工作。

昨天事件查看器中的错误是

Error Code:  6  Exception Message:  Could not connect to the remote computer ("MYDOMAIN.scm.azurewebsites.net") using the specified process ("Web Management Service") because the server did not respond. Make sure that the process ("Web Management Service") is started on the remote computer.  Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_COULD_NOT_CONNECT_TO_REMOTESVC.  Exception Stack Trace: The remote server returned an error: (403) Forbidden.
   at System.Net.HttpWebRequest.GetResponse()
   at Microsoft.Web.Deployment.AgentClientProvider.GetHttpResponseHelper(HttpWebRequest request)
   --- End of inner exception stack trace ---   
Could not connect to the remote computer ("MYDOMAIN.scm.azurewebsites.net") using the specified process ("Web Management Service") because the server did not respond. Make sure that the process ("Web Management Service") is started on the remote computer.  Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_COULD_NOT_CONNECT_TO_REMOTESVC.
   at Microsoft.Web.Deployment.AgentClientProvider.GetHttpResponseHelper(HttpWebRequest request)
   at Microsoft.Web.Deployment.AgentClientProvider.GetHttpResponse(HttpWebRequest request)
   at Microsoft.Web.Deployment.AgentClientProvider.PerformHeadRequestHelper(Boolean getVersionInfo, Version& maximumSupportedVersion, Version& minimumSupportedVersion)
   at Microsoft.Web.Deployment.AgentClientProvider..ctor(DeploymentProviderContext providerContext, DeploymentBaseContext baseContext, String serverVersion)
   at Microsoft.Web.Deployment.DeploymentManager.CreateObjectPrivate(DeploymentProviderContext providerContext, DeploymentBaseOptions baseOptions, DeploymentObject sourceObject, String serverVersion)
   at Microsoft.Web.Deployment.DeploymentManager.CreateDestinationObject(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions, DeploymentObject sourceObject, String serverVersion)
   at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions) 

今天的错误是:

Error Code:  103  Exception Message:  Web Deploy experienced a connection problem with the server and had to terminate the connection.  Contact your server administrator if the problem persists.  Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_CONNECTION_TERMINATED.  Exception Stack Trace: Root element is missing.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
   at System.Xml.XmlTextReaderImpl.Read()
   at System.Xml.XmlTextReader.Read()
   at System.Xml.XmlReader.MoveToContent()
   at Microsoft.Web.Deployment.TraceEventSerializer.Deserialize(Stream responseStream, DeploymentBaseContext baseContext, DeploymentSyncContext syncContext)
   --- End of inner exception stack trace ---   
Web Deploy experienced a connection problem with the server and had to terminate the connection.  Contact your server administrator if the problem persists.  Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_CONNECTION_TERMINATED.
   at Microsoft.Web.Deployment.TraceEventSerializer.Deserialize(Stream responseStream, DeploymentBaseContext baseContext, DeploymentSyncContext syncContext)
   at Microsoft.Web.Deployment.AgentClientProvider.RemoteDestSync(DeploymentObject sourceObject, DeploymentSyncContext syncContext, Nullable`1 syncPass, String syncSessionId)
   at Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject destObject, DeploymentSyncOptions syncOptions, PayloadTable payloadTable, ContentRootTable contentRootTable, Nullable`1 syncPassId, String syncSessionId)
   at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions) 

[查看了有关此事的许多不确定结论,(并且由于该错误ERROR_CONNECTION_TERMINATED未在错误提供的官方故障排除网站上列出,所以我做了以下事情:(1)重新启动计算机(2)重新启动Visual Studio(3)以管理员身份打开Visual Studio(4)从Azure重新下载发布配置文件

这些都不起作用。

在发布配置文件窗口中,当我单击“验证”以获取我的凭据时,它们通过。只有当我预览或运行发布时,它才会出错。

最终起作用的是

((5)在Azure WEBSITE_WEBDEPLOY_USE_SCM中将应用程序设置设置为false

我查了一下,不知道它做了什么,为什么我需要这样做,以及为什么在没有此设置的情况下它可以正常工作。感觉像是一个修补程序,我不喜欢它。我应该保留此应用程序设置吗?

更新:不确定SCM设置是否有帮助。我能够发布一次,没有一次不能发布。

azure webdeploy
1个回答
0
投票

首先,关闭防火墙和基于本地代理的软件。

第二,请确保您已安装Web部署处理程序,并且已安装所有选项。

enter image description here

((未选择添加选项。)

重要,请确保您对管理服务没有IP限制。

您可以在此官方文档中找到其他可能的原因:

https://docs.microsoft.com/en-us/iis/publish/troubleshooting-web-deploy/troubleshooting-web-deploy-problems-with-visual-studio

© www.soinside.com 2019 - 2024. All rights reserved.