"Not a valid Base-64 string" during deployment of UNC based website

I’m creating a new website on a working server, whose base path will be on an existing UNC folder. I was able to get past the error where we couldn’t execute a powershell script (disabled IE Enhanced Security on the tentacle server).

Now I’m getting this error, and it appears to be creating a website on the UNC server itself, no the server where the tentacle is installed (and I want the website).

Executing feature-class ‘Calamari.Deployment.Features.IisWebSiteBeforeDeployFeature’
12:37:17 Verbose | Found existing certificate with thumbprint ‘BD76793883E91C3A26CF7B6DAECBBB505365CA3B’ in Cert:\LocalMachine\My
12:37:17 Verbose | Creating ‘\SERVER1\WEBFOLDERPATH\Octopus.Features.IISWebSite_BeforePostDeploy.ps1’ from embedded resource
12:37:17 Verbose | Executing ‘\SERVER1\WEBFOLDERPATH\Octopus.Features.IISWebSite_BeforePostDeploy.ps1’
12:37:18 Verbose | Name Value
12:37:18 Verbose | ---- -----
12:37:18 Verbose | PSVersion 5.1.14393.2273
12:37:18 Verbose | PSEdition Desktop
12:37:18 Verbose | PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
12:37:18 Verbose | BuildVersion 10.0.14393.2273
12:37:18 Verbose | CLRVersion 4.0.30319.42000
12:37:18 Verbose | WSManStackVersion 3.0
12:37:18 Verbose | PSRemotingProtocolVersion 2.3
12:37:18 Verbose | SerializationVersion 1.1.0.1
12:37:19 Error | Exception calling “FromBase64String” with “1” argument(s): "The input is not a valid Base-64 string as it contains a
12:37:19 Error | non-base 64 character, more than two padding characters, or an illegal character among the padding characters. "
12:37:19 Error | At \SERVER1\WEBFOLDERPATH\Bootstrap.Octopus.Features.IISWebSite_BeforePostDeploy.ps1:343 char:13
12:37:19 Error | + [System.Text.Encoding]::UTF8.GetString([Convert]::FromBas …
12:37:19 Error | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
12:37:19 Error | + CategoryInfo : NotSpecified: (:slight_smile: , ParentContainsErrorRecordException
12:37:19 Error | + FullyQualifiedErrorId : FormatException
12:37:19 Verbose | Deleting ‘\SERVER1\WEBFOLDERPATH\Octopus.Features.IISWebSite_BeforePostDeploy.ps1’
12:37:19 Error | Script ‘\SERVER1\WEBFOLDERPATH\Octopus.Features.IISWebSite_BeforePostDeploy.ps1’ returned non-zero exit code: 1
12:37:19 Error | Running rollback conventions…
12:37:19 Verbose | Adding journal entry:
12:37:19 Verbose |
12:37:19 Error | Access to the path is denied.
12:37:19 Error | System.UnauthorizedAccessException
12:37:19 Error | at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
12:37:19 Error | at System.IO.File.InternalReplace(String sourceFileName, String destinationFileName, String destinationBackupFileName, Boolean ignoreMetadataErrors)
12:37:19 Error | at Calamari.Integration.FileSystem.CalamariPhysicalFileSystem.OverwriteAndDelete(String originalFile, String temporaryReplacement)
12:37:19 Error | at Calamari.Deployment.Journal.DeploymentJournal.Write(IEnumerable`1 elements)
12:37:19 Error | at Calamari.Deployment.Journal.DeploymentJournal.AddJournalEntry(JournalEntry entry)
12:37:19 Error | at Calamari.Commands.DeployPackageCommand.Execute(String commandLineArguments)
12:37:19 Error | at Calamari.Program.Execute(String args)
12:37:19 Verbose | Process C:\WINDOWS\system32\WindowsPowershell\v1.0\PowerShell.exe in C:\Octopus\Work\20180910173715-65073-94 exited with code 100
12:37:19 Verbose | Updating manifest with output variables
12:37:19 Verbose | Updating manifest with action evaluated variables
12:37:19 Fatal | The remote script failed with exit code 100
12:37:19 Fatal | The action Deploy Website (pointed to existing Onearea) on DHEWS-IRV-01 failed

“NULL” is an empty nuget package, as there’s no code for this - it’s more a CDN and I couldn’t figure out how to deploy a website shell pointed to existing files without a nuget package.

Hi Jeff,

You might be better off using this step template from our Community Library to create the IIS website pointing to your UNC path.

What version of Octopus are you currently running?

If you can’t get the step template above working, could you send through screenshots of how you’ve configured your step and I’ll see if I can figure out how we can get it working for your scenario.

Thank you and best regards,
Henrik

I had taken a look at that, but since we’re trying to let OctopusDeploy manage SSL certificates, I steered away from it.

Do we know why the script is executing on the UNC where the files are being deployed, and not the server where the web site is?

Hi Jeff,

It depends on how you’ve configured your step, if you’ve specified a custom install directory then the script will be run in that directory.

So if you could send through what version of Octopus you are currently running and also a screenshot of how your step has been configured I can see if I can figure out a solution for your scenario.

Thanks,
Henrik

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.