saritasa-nest / saritasa-dotnet-psgallery

Saritasa PowerShell Gallery
MIT License
19 stars 8 forks source link

Allow web project deployment to localhost #25

Open dermeister0 opened 7 years ago

dermeister0 commented 7 years ago

Web management service is not required in that case.

dermeister0 commented 7 years ago

Deployment does not work if Web Management Service is used instead of Deployment Agent Service.

function GetComputerName([string] $ServerHost, [string] $SiteName)
{
    if (!(Test-IsLocalhost $ServerHost)) # Remote server.
    {
        "https://${ServerHost}:$msdeployPort/msdeploy.axd?site=$SiteName"
    }
    else
    {
        'localhost'
    }
}

Error Code: ERROR_DESTINATION_NOT_REACHABLE More Information: Could not connect to the remote computer ("localhost"). 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: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE.