I need help debugging the deployment of a ASP.NET Core MVC application.
The deployment goes as follows: I push code (right now, just a fresh template project) from Visual Studio into an Azure DevOps Git repository.
Then the Azure DevOps Pipeline builds the project, and pushes it to my Octopus Deploy Server. The Octopus Server deploys the package to my IIS Server.
The process seems to work. I can get from A-B, and I can see the deployed site in IIS manager.
But the site does not work - I get a HTTP error 403.14 - forbidden.
I don't know what is wrong, but I have a feeling it has something to do with my build.
The zip file containing the build has a very deep folder structure, and consequently that structure is also present in the IIS server. I'm not saying that a deep folder structure is the problem it self, but rather that it does not seem like a "refined" package ready for deployment.
Here is a my Azure DevOps pipeline yml
trigger:
- master
pool:
vmImage: 'windows-latest'
name: 1.$(Year:yy)$(DayOfYear)$(Rev:.r) #this effects BuildNumber
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
releaseNumber: '$(Build.Repository.Name).$(Build.buildNumber)'
steps:
- task: NuGetToolInstaller@1
displayName: 'Use Nuget'
- task: NuGetCommand@2
displayName: 'Nuget Restore'
inputs:
restoreSolution: '$(solution)'
- task: VSBuild@1
displayName: 'Build Solution And Create Default Package'
inputs:
solution: '$(solution)'
msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:DesktopBuildPackageLocation="$(build.artifactStagingDirectory)/$(releaseNumber).zip"'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- task: OctopusPush@6
displayName: 'Push package to Octopus'
inputs:
OctoConnectedServiceName: 'DarkHelmet-IIS Octopus Server'
Space: 'Default'
Packages: '$(build.artifactStagingDirectory)/$(releaseNumber).zip'
Replace: 'false'
- task: OctopusCreateRelease@6
displayName: 'Create Octopus Release'
inputs:
OctoConnectedServiceName: 'DarkHelmet-IIS Octopus Server'
Space: 'Default'
Project: 'ShoppingList'
Channel: 'Default'
ReleaseNumber: '$(releaseNumber)'
The pipeline runs with success.
In Octopus Deploy I only have one step added "Deploy to IIS"
In the IIS server you can see the deep folder I mentioned - it seems off, but not sure.
Can anyone give me a hint on where to look ?
Thanks :)