Hi, I’m trying to deploy a package to IIS as web application. But this step keeps failing with the error “Operation is not valid due to the current state of the object”. The detailed error log is below -
8:23:53 Info | Deploying package: E:\Octopus\Tentacle\Files\PLC.API@S1.0.0.0@1342835A3BCA9E42A9F50CDFADC13DA4.nupkg
18:23:54 Verbose | Extracting package to: C:\Websites\dev-myplc.iapmo.org\Development\PLC.API\1.0.0.0_18
18:23:54 Error | System.InvalidOperationException: Operation is not valid due to the current state of the object.
18:23:54 Error | at SharpCompress.Common.Zip.SeekableZipHeaderFactory.GetLocalHeader(Stream stream, DirectoryEntryHeader directoryEntryHeader)
18:23:54 Error | at SharpCompress.Common.Zip.SeekableZipFilePart.LoadLocalHeader()
18:23:54 Error | at SharpCompress.Common.Zip.SeekableZipFilePart.GetCompressedStream()
18:23:54 Error | at SharpCompress.Archives.IArchiveEntryExtensions.WriteTo(IArchiveEntry archiveEntry, Stream streamToWriteTo)
18:23:54 Error | at SharpCompress.Archives.IArchiveEntryExtensions.<>c__DisplayClass2_0.b__0(String x, FileMode fm)
18:23:54 Error | at SharpCompress.Common.ExtractionMethods.WriteEntryToFile(IEntry entry, String destinationFileName, ExtractionOptions options, Action2 openAndWrite) 18:23:54 Error | at Calamari.Common.Features.Packages.NuGet.NupkgExtractor.Extract(String packageFile, String directory) 18:23:54 Error | at Calamari.Common.Features.Packages.ExtractPackage.Extract(PathToPackage pathToPackage, String targetPath, IPackageExtractor customPackageExtractor) 18:23:54 Error | at Calamari.Deployment.ConventionProcessor.RunInstallConventions() 18:23:54 Error | at Calamari.Deployment.ConventionProcessor.RunConventions() 18:23:54 Error | Running rollback conventions... 18:23:54 Verbose | Adding journal entry: 18:23:54 Verbose | <Deployment Id="9775b7c8-5d4d-4b4c-bc31-3828a30a25b9" EnvironmentId="Environments-2" TenantId="" ProjectId="Projects-1" InstalledOn="2020-12-09 02:23:54" RetentionPolicySet="Environments-2/Projects-1/Step-Deploy PLC API to IIS/Machines-1/<default>" ExtractedTo="" CustomInstallationDirectory="C:\websites\dev-myplc.api.iapmo.org" WasSuccessful="False"> 18:23:54 Verbose | <Package PackageId="PLC.API" PackageVersion="1.0.0.0" DeployedFrom="E:\Octopus\Tentacle\Files\PLC.API@S1.0.0.0@1342835A3BCA9E42A9F50CDFADC13DA4.nupkg" /> 18:23:54 Verbose | </Deployment> 18:23:54 Error | Operation is not valid due to the current state of the object. 18:23:54 Error | System.InvalidOperationException 18:23:54 Error | at SharpCompress.Common.Zip.SeekableZipHeaderFactory.GetLocalHeader(Stream stream, DirectoryEntryHeader directoryEntryHeader) 18:23:54 Error | at SharpCompress.Common.Zip.SeekableZipFilePart.LoadLocalHeader() 18:23:54 Error | at SharpCompress.Common.Zip.SeekableZipFilePart.GetCompressedStream() 18:23:54 Error | at SharpCompress.Archives.IArchiveEntryExtensions.WriteTo(IArchiveEntry archiveEntry, Stream streamToWriteTo) 18:23:54 Error | at SharpCompress.Archives.IArchiveEntryExtensions.<>c__DisplayClass2_0.<WriteToFile>b__0(String x, FileMode fm) 18:23:54 Error | at SharpCompress.Common.ExtractionMethods.WriteEntryToFile(IEntry entry, String destinationFileName, ExtractionOptions options, Action
2 openAndWrite)
18:23:54 Error | at Calamari.Common.Features.Packages.NuGet.NupkgExtractor.Extract(String packageFile, String directory)
18:23:54 Error | at Calamari.Common.Features.Packages.ExtractPackage.Extract(PathToPackage pathToPackage, String targetPath, IPackageExtractor customPackageExtractor)
18:23:54 Error | at Calamari.Deployment.ConventionProcessor.RunInstallConventions()
18:23:54 Error | at Calamari.Deployment.ConventionProcessor.RunConventions()
18:23:54 Error | at Calamari.Commands.DeployPackageCommand.Execute(String[] commandLineArguments)
18:23:54 Error | at Calamari.Common.CalamariFlavourProgram.Run(String[] args)
18:23:54 Verbose | Process C:\Windows\system32\WindowsPowershell\v1.0\PowerShell.exe in E:\Octopus\Tentacle\Work\20201209022352-115-96 exited with code 100