简体   繁体   English

部署到Azure虚拟目录-Web部署任务失败(无法完成对远程代理URL的请求

[英]Deploy to Azure Virtual Directory - Web deployment task failed.(Could not complete the request to remote agent URL

I'm having issues deploying an asp.net mvc 4 project from the buildserver to Azure. 我在从构建服务器到Azure部署asp.net mvc 4项目时遇到问题。

We have one azure web site (strictly with nothing deployed to it directly), with a number of Apps deployed in virtual directories underneath. 我们有一个蔚蓝的网站(严格地讲,没有直接部署到该网站),并且在其下的虚拟目录中部署了许多应用程序。 It is with these apps / virtual directories I'm having problems deploying to. 这些应用程序/虚拟目录正是我在部署时遇到的问题。

I can deploy direct to Azure from within VS using publish profiles, and also from a batch file which uses publish profiles locally, but it sounds like you cannot use publish profiles on a build server, so I'm using the same settings to fire MSBuild with parameters instead. 我可以使用发布配置文件从VS内部直接部署到Azure,也可以从本地使用发布配置文件的批处理文件直接部署到Azure,但这听起来像您无法在构建服务器上使用发布配置文件,所以我使用相同的设置来触发MSBuild使用参数代替。

The error being returned is: 返回的错误是:

error : Web deployment task failed.(Could not complete the request to remote agent URL 'http://[site].scm.azurewebsites.net:443/MSDEPLOYAGENTSERVICE'.)

Note this first error lists the main site, not the virtual directory, though this is the value from the .pubxml file that works through VS. 请注意,第一个错误列出了主要站点,而不是虚拟目录,尽管这是可通过VS使用的.pubxml文件中的值。 Other errors listed after the first (above) are.. 在第一个(上面)之后列出的其他错误是..

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets(3847,5): error : This error indicates that you cannot connect to the server. Make sure the service URL is correct, firewall and network settings on this computer and on the server computer are configured properly, and the appropriate services have been started on the server. 

error : Could not complete the request to remote agent URL 'http://[site].scm.azurewebsites.net:443/MSDEPLOYAGENTSERVICE'.
error : The underlying connection was closed: An unexpected error occurred on a receive.
error : Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.

..and the batch file including the msbuild commands & paramaters is.. ..和包括msbuild命令和参数的批处理文件是..

msbuild projectname.csproj 
/P:Configuration=DevDeployMyApp 
/p:DeployTarget=MSDeployPublish 
/p:DeployOnBuild=True 
/p:MsDeployServiceUrl=[Site].scm.azurewebsites.net:443
/p:AllowUntrustedCertificate=True 
/p:VisualStudioVersion=11.0 
/P:CreatePackageOnPublish=True 
/p:username=[user]
/p:Password=[password]
/p:DeployIisAppPath=[site]/[VirtualDirectoryName]
/p:MSDeployPublishMethod=RemoteAgent 
/p:IgnoreDeployManagedRuntimeVersion=True

Any ideas? 有任何想法吗?

Is your service is already running, try going into the Azure portal and stopping it before publishing. 如果您的服务已经在运行,请尝试进入Azure门户并停止发布,然后再发布。 That sometimes helps get it unstuck. 有时这有助于使其解开。

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

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