WebDeploy IIS8 VS2022 Not Working

j g 6 Reputation points
2022-04-29T15:41:37.367+00:00

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 development | Internet Information Services
{count} votes

2 answers

Sort by: Most helpful
  1. j g 6 Reputation points
    2022-05-02T17:04:18.147+00:00

    @Sam Wu-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.

    0 comments No comments

  2. j g 6 Reputation points
    2022-05-02T22:33:42.303+00:00

    @Sam Wu-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)


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.