Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: IISWebAppManagementOnMachineGroup@0 accepts physical paths with forward slashes ('/') #19984

Open
4 of 7 tasks
pasisavolainen opened this issue Jun 11, 2024 · 0 comments

Comments

@pasisavolainen
Copy link

New issue checklist

Task name

IISWebAppManagementOnMachineGroup

Task version

0

Issue Description

IISWebAppManagementOnMachineGroup should not accept physical paths with forward slashes, /.

They don't work correctly (at least on IIS-8.5):

  • application created correctly under 'Default Web Site'
  • application pool created correctly, starts up (seen as correct username on w3wp.exe worker in taskman)
  • all calls to website result in 404, goes into iis web core trying resolve a file from filesystem (however will not accept physical files corresponding to queries)
  • no actual visible errors anywhere in eventlog/
  • Failed Request Tracing catches the 404 but doesn't show any pathing issues
  • changing application path (Basic Settings -> Physical path) to have backslashes corrects action

Why this is pipeline task issue?

With yml 'unclear' (= fookin murky) slash/escape situation the pressure to use forward slashes is high and this mistake is easy make. Also fat chance getting this kind of issue fixed in IIS.

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

Windows

Relevant log output

-

Full task logs with system.debug enabled

No response

Repro steps

# deploysource.path is simple identifier like 'productminimal'
# parameters.websiteName is 'Default Web Site'
- task: IISWebAppManagementOnMachineGroup@0
  inputs:
    IISDeploymentType: 'IISWebApplication'
    ParentWebsiteNameForApplication: ${{ parameters.websiteName }}
    VirtualPathForApplication: '/${{ deploysource.Path }}'
    # no wok:
    #WebsitePhysicalPath: 'D:/app/slab/product/${{ deploysource.Path }}/$(BuildPackageVersion)'
    # yes wok:
    WebsitePhysicalPath: 'D:\app\slab\product\${{ deploysource.Path }}\$(BuildPackageVersion)'
    PhysicalPathForApplication: 'D:\app\slab\product\${{ deploysource.Path }}\$(BuildPackageVersion)'
    CreateOrUpdateAppPoolForApplication: true
    AppPoolNameForApplication: '${{ deploysource.path }}_AppPool'
    DotNetVersionForApplication: 'No Managed Code'
- task: IISWebAppDeploymentOnMachineGroup@0
  displayName: Deploying IIS WebApp from $(Build.ArtifactStagingDirectory)/deploy/${{ deploysource.path}}
  inputs:
    WebSiteName: '${{ parameters.websiteName }}/${{ deploysource.path }}'
    Package: '$(Build.ArtifactStagingDirectory)/deploy/${{ deploysource.path}}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants