Search code examples
azure-pipelinescicdazure-pipelines-release-pipelineazure-pipelines-yaml

Create or update websites task failed


Devops release fails with the error: "Cannot find drive. A drive with the name 'X' does not exist."

- task: IISWebAppManagementOnMachineGroup@0              
              inputs:
                EnableIIS: true
                WebsiteName: 
                WebsitePhysicalPath: 'X:\iis\abc.com'
                WebsitePhysicalPathAuth: WebsiteWindowsAuth
                WebsiteAuthUserName: 
                WebsiteAuthUserPassword: 
                AddBinding: true
                Bindings: '{"bindings":[{"protocol":"https","ipAddress":"All Unassigned","port":"443","hostname":"","sslThumbprint":"","sniFlag":true}]}'
                CreateOrUpdateAppPoolForWebsite: true
                ConfigureAuthenticationForWebsite: true
                AppPoolNameForWebsite: 
                AnonymousAuthenticationForWebsite: true
                WindowsAuthenticationForWebsite: false

The server it is trying to access has the location available but still I see this error.


Solution

  • The issue was with : next to the drive label it should be $ sign and that works fine

    Modify the below value and it will work as expected

    WebsitePhysicalPath: 'X$\iis\abc.com'