question

jg-6461 avatar image
0 Votes"
jg-6461 asked SamWu-MSFT commented

WebDeploy IIS8 VS2022 Not Working

I am trying to deploy my website to the cloud and WebDeploy is failing

Detailed error message below.
I have checked for 8172 is open on Windows Firewall
I have configured a Windows Admin user for the WebDeploy operation
I have WebDeploy 3.6 & 3.5 installed
This is for IIS using VS2022.


C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VisualStudio\v17.0\Web\Microsoft.Web.Publishing.targets(4362,5): Error : Web deployment task failed. (Could not complete the request to remote agent URL 'https://ec2-xx-xxx-xxx-xxx.compute-1.amazonaws.com:8172/msdeploy.axd?site=xxxxxx'.)
2>
2>Could not complete the request to remote agent URL 'https://ec2-xx-xxx-xxx-xxx.compute-1.amazonaws.com:8172/msdeploy.axd?site=xxxxxx'.
2>The request was aborted: The request was canceled.
2>This method is not supported by this class.
2>
2>Could not complete the request to remote agent URL 'https://ec2-xx-xxx-xxx-xxx.compute-1.amazonaws.com:8172/msdeploy.axd?site=xxxxxx'.
2>The request was aborted: The request was canceled.
2>This method is not supported by this class.
2> at Microsoft.Web.Deployment.AgentClientProvider.GetHttpResponseHelper(HttpWebRequest request)
2> at Microsoft.Web.Deployment.AgentClientProvider.GetHttpResponse(HttpWebRequest request)
2> at Microsoft.Web.Deployment.AgentClientProvider.PerformHeadRequestHelper(Boolean getVersionInfo, Version& maximumSupportedVersion, Version& minimumSupportedVersion)
2> at Microsoft.Web.Deployment.AgentClientProvider..ctor(DeploymentProviderContext providerContext, DeploymentBaseContext baseContext, String serverVersion)
2> at Microsoft.Web.Deployment.DeploymentManager.CreateObjectPrivate(DeploymentProviderContext providerContext, DeploymentBaseOptions baseOptions, DeploymentObject sourceObject, String serverVersion)
2> at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions)
2> at Microsoft.Web.Publishing.Tasks.VSMSDeployObject.SyncTo(VSMSDeployObject destObject, Object syncOptions, IVSMSDeployHost _host)
2> at Microsoft.Web.Publishing.Tasks.BaseMSDeployDriver.InvokeMSdeploySync()
2> at Microsoft.Web.Publishing.Tasks.BaseMSDeployDriver.SyncThruMSDeploy()
2> at Microsoft.Web.Publishing.Tasks.VSMSDeploy.Execute()
2> Publish failed to deploy.
2>Done building project "xxxxxx.csproj" -- FAILED.
2>

windows-server-iis
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@jg-6461 How did you deploy your project? try restarting your visual studio and try again.

0 Votes 0 ·

I can't deploy it because WebDeploy isn't working.
I tried restarting VS to no avail.

0 Votes 0 ·
jg-6461 avatar image
0 Votes"
jg-6461 answered

@SamWu-MSFT
I looked into the EventView logs and found "Error Code: 5 Exception Message: Could not connect to the remote computer "
I checked the firewall port 8172 is open.
The required process ("Web Management Service") is started
Web Platform Installer indicates that Web Deploy 3.5 w/o SQL, 3.5, 3.5 Hosting Servers, 3.5 w/o SQL, 3.6, and 3.6 for Hosting Servers are installed.
Right click on my IIS website gives the option "Deploy" and then "Configure Web Deploy Publishing" which I have done.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

jg-6461 avatar image
0 Votes"
jg-6461 answered SamWu-MSFT commented

@SamWu-MSFT

This is the current error when trying to web deploy my project.

I found there is no file msdeploy.axd on the server

Error Code: 0 Exception Message: Could not complete the request to remote agent URL 'https://xxx-xx-xxx-xxx-xxx.compute-1.amazonaws.com:8172/msdeploy.axd?site=xxxxxxx'. Exception Stack Trace: This method is not supported by this class.
at System.Net.BasicClient.EncodingRightGetBytes(String rawString)
at System.Net.BasicClient.Lookup(HttpWebRequest httpWebRequest, ICredentials credentials)
at System.Net.AuthenticationManagerDefault.Authenticate(String challenge, WebRequest request, ICredentials credentials)
at System.Net.AuthenticationState.AttemptAuthenticate(HttpWebRequest httpWebRequest, ICredentials authInfo)
at System.Net.HttpWebRequest.CheckResubmitForAuth()
at System.Net.HttpWebRequest.CheckResubmit(Exception& e, Boolean& disableUpload)
at System.Net.HttpWebRequest.DoSubmitRequestProcessing(Exception& exception)
at System.Net.HttpWebRequest.ProcessResponse()
at System.Net.HttpWebRequest.SetResponse(CoreResponseData coreResponseData)
--- End of inner exception stack trace ---
The request was aborted: The request was canceled.
at System.Net.HttpWebRequest.GetResponse()
at Microsoft.Web.Deployment.AgentClientProvider.GetHttpResponseHelper(HttpWebRequest request)
--- End of inner exception stack trace ---
Could not complete the request to remote agent URL 'https://xxx-xx-xxx-xxx-xxx.compute-1.amazonaws.com:8172/msdeploy.axd?site=xxxxxxx'.
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.DeploymentObject.SyncTo(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions)

· 6
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@jg-6461 Have you tried accessing this url(https://xxx-xx-xxx-xxx-xxx.compute-1.amazonaws.com:8172/msdeploy.axd?site=xxxxxxx)? Here is the same issue you can use as a reference: publish-web-web-deploy, or you can also refer to this link to troubleshoot your web deploy problems: troubleshooting-web-deploy-problems-with-visual-studio.

0 Votes 0 ·

there is no file "msdeploy.axd" in the folder
I navigated to the URL mentioned above, was prompted for credentials, entered them, and was logged in.
When I enter the same credentials in the Publish section of VS, the "Validate" button fails. Not sure why.
Ok FireFox give a blank page, IE and Chrome whine that the page can't be found.
The VS Validate button gives the error "Could not complete the request to remote agent URL "
From the troubleshooting web deploy link you gave, based on #4, I changed the publish server to ec2-xx-xxx-xxx-xxx.compute-1.amazonaws.com/MSDeployAgentService.


Microsoft Visual Studio


Could not connect to the remote computer ("ec2-xx-xxx-xxx-xxx.compute-1.amazonaws.com"). On the remote computer, make sure that Web Deploy is installed and that the required process ("Web Deployment Agent Service") is started. Learn more at: https://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE. The remote server returned an error: (404) Not Found.

I have made sure that Web Deploy is installed and "Web Deployment Agent Service" is running.



0 Votes 0 ·

there is no file "msdeploy.axd" in the folder
I navigated to the URL mentioned above, was prompted for credentials, entered them, and was logged in.
When I enter the same credentials in the Publish section of VS, the "Validate" button fails. Not sure why.
Ok FireFox give a blank page, IE and Chrome whine that the page can't be found.


Microsoft Visual Studio


Could not complete the request to remote agent URL 'https://ec2-xx-xxx-xxx-xxx.compute-1.amazonaws.com:8172/msdeploy.axd?site=xxxxxx'. The request was aborted: The request was canceled.

0 Votes 0 ·

@jg-6461

there is no file "msdeploy.axd" in the folder

If there is no msdeploy.axd, it means that Web Deploy is not installed(Web Deploy registers a handler msdeploy.axd with WMSVC, so a 404 would be the expected status code if it weren't installed), so please check your configuration again, it is also possible that there is a problem with your Web Deploy installation, you can use the link below to install it: Web Deploy 3.6.

0 Votes 0 ·
Show more comments