Transformation of web.config

In my application there are three config files
Web.AppSettings.config
Web.config
Web.pre.Release.config

when i use below syntax in the additional transformation section in the logs it shows transformation from to but on the actual web.config does not reflect new values from Web.pre.Release.config
Web.pre.Release.config => Web.config
Web.pre.Release.config => Web.AppSettings.config

Please assist me if i am missing anything…

Thanks,
Jay

Hi Jayraj,

Thanks for getting in touch! I’m sorry you’re hitting some unexpected behavior here. Your syntax for additional transforms is perfect, so I’m unsure what’s going on at this stage. Would you be willing to provide a copy of your verbose deployment logs with debugging variables enabled? This will give us more insight to find what’s going on here. The following doc page outlines how you can produce and export this log.

I look forward to hearing back and getting to the bottom of this one!

Best regards,

Kenny

07:05:27 Verbose | [Octopus.Tentacle.PreviousSuccessfulInstallation.PackageFilePath] = ‘C:\Octopus\Files\ScreeningDirect_test@S0.0.1@521FF2B5C73CEB459C9CA735A9D56B9F.nupkg’
07:05:27 Verbose | [Octopus.Tentacle.PreviousSuccessfulInstallation.PackageVersion] = ‘0.0.1’
07:05:27 Verbose | [Octopus.Web.BaseUrl] = ‘http://jenkinscfa.stback.com:8080
07:05:27 Verbose | [Octopus.Web.DeploymentLink] = ‘/app#/deployments/Deployments-14682’
07:05:27 Verbose | [Octopus.Web.ProjectLink] = ‘/app#/projects/Projects-402’
07:05:27 Verbose | [Octopus.Web.ReleaseLink] = ‘/app#/releases/Releases-11181’
07:05:27 Verbose | [OctopusPrintEvaluatedVariables] = ‘True’
07:05:27 Verbose | [OctopusPrintVariables] = ‘True’
07:05:27 Verbose | [OctopusRetentionPolicySet] = ‘Environments-202/Projects-402/Step-Deploy/Machines-434/’
07:05:27 Verbose | [OctopusUseGuidedFailure] = ‘False’
07:05:27 Verbose | Extracting package to: C:\Octopus\Applications\pre\ScreeningDirect_test\0.0.1
07:05:33 Verbose | Extracted 4232 files
07:05:33 Info | Transforming ‘C:\Octopus\Applications\pre\ScreeningDirect_test\0.0.1\Web.AppSettings.config’ using ‘C:\Octopus\Applications\pre\ScreeningDirect_test\0.0.1\Web.pre.Release.config’.
07:05:33 Verbose | Warning will be elevated to errors. Prevent this by adding the variable Octopus.Action.Package.TreatConfigTransformationWarningsAsErrors and setting it to false.
07:05:33 Verbose | The expected namespace http://schemas.microsoft.com/XML-Document-Transform was not found in the transform file
07:05:33 Info | Transforming ‘C:\Octopus\Applications\pre\ScreeningDirect_test\0.0.1\Web.config’ using ‘C:\Octopus\Applications\pre\ScreeningDirect_test\0.0.1\Web.pre.Release.config’.
07:05:33 Verbose | Warning will be elevated to errors. Prevent this by adding the variable Octopus.Action.Package.TreatConfigTransformationWarningsAsErrors and setting it to false.
07:05:33 Verbose | The expected namespace http://schemas.microsoft.com/XML-Document-Transform was not found in the transform file
07:05:33 Verbose | Looking for appSettings, applicationSettings, and connectionStrings in any .config files
07:05:33 Info | No matching appSetting, applicationSetting, nor connectionString names were found in: C:\Octopus\Applications\pre\ScreeningDirect_test\0.0.1\Web.AppSettings.config
07:05:33 Info | No matching appSetting, applicationSetting, nor connectionString names were found in: C:\Octopus\Applications\pre\ScreeningDirect_test\0.0.1\Web.config
07:05:33 Verbose | File ‘C:\Octopus\Applications\pre\ScreeningDirect_test\0.0.1\Web.pre.Release.config’ was interpreted as an XML configuration transform; variable substitution won’t be attempted.
07:05:33 Info | No matching appSetting, applicationSetting, nor connectionString names were found in: C:\Octopus\Applications\pre\ScreeningDirect_test\0.0.1\bin\absHire.Web.dll.config
07:05:33 Info | No matching appSetting, applicationSetting, nor connectionString names were found in: C:\Octopus\Applications\pre\ScreeningDirect_test\0.0.1\CuteSoft_Client\CuteEditor\Configuration\AutoConfigure\Compact.config
07:05:33 Info | No matching appSetting, applicationSetting, nor connectionString names were found in: C:\Octopus\Applications\pre\ScreeningDirect_test\0.0.1\CuteSoft_Client\CuteEditor\Configuration\AutoConfigure\Default.config
07:05:33 Info | No matching appSetting, applicationSetting, nor connectionString names were found in: C:\Octopus\Applications\pre\ScreeningDirect_test\0.0.1\CuteSoft_Client\CuteEditor\Configuration\AutoConfigure\Full.config
07:05:33 Info | No matching appSetting, applicationSetting, nor connectionString names were found in: C:\Octopus\Applications\pre\ScreeningDirect_test\0.0.1\CuteSoft_Client\CuteEditor\Configuration\AutoConfigure\Full_noform.config
07:05:33 Info | No matching appSetting, applicationSetting, nor connectionString names were found in: C:\Octopus\Applications\pre\ScreeningDirect_test\0.0.1\CuteSoft_Client\CuteEditor\Configuration\AutoConfigure\Minimal.config
07:05:33 Info | No matching appSetting, applicationSetting, nor connectionString names were found in: C:\Octopus\Applications\pre\ScreeningDirect_test\0.0.1\CuteSoft_Client\CuteEditor\Configuration\AutoConfigure\MyTool.config
07:05:33 Info | No matching appSetting, applicationSetting, nor connectionString names were found in: C:\Octopus\Applications\pre\ScreeningDirect_test\0.0.1\CuteSoft_Client\CuteEditor\Configuration\AutoConfigure\None.config
07:05:33 Info | No matching appSetting, applicationSetting, nor connectionString names were found in: C:\Octopus\Applications\pre\ScreeningDirect_test\0.0.1\CuteSoft_Client\CuteEditor\Configuration\AutoConfigure\Sample.config
07:05:33 Info | No matching appSetting, applicationSetting, nor connectionString names were found in: C:\Octopus\Applications\pre\ScreeningDirect_test\0.0.1\CuteSoft_Client\CuteEditor\Configuration\AutoConfigure\Simple.config
07:05:33 Info | No matching appSetting, applicationSetting, nor connectionString names were found in: C:\Octopus\Applications\pre\ScreeningDirect_test\0.0.1\CuteSoft_Client\CuteEditor\Configuration\ContextMenuMode\Compact.config
07:05:33 Info | No matching appSetting, applicationSetting, nor connectionString names were found in: C:\Octopus\Applications\pre\ScreeningDirect_test\0.0.1\CuteSoft_Client\CuteEditor\Configuration\ContextMenuMode\Default.config
07:05:33 Info | No matching appSetting, applicationSetting, nor connectionString names were found in: C:\Octopus\Applications\pre\ScreeningDirect_test\0.0.1\CuteSoft_Client\CuteEditor\Configuration\ContextMenuMode\Full.config
07:05:33 Info | No matching appSetting, applicationSetting, nor connectionString names were found in: C:\Octopus\Applications\pre\ScreeningDirect_test\0.0.1\CuteSoft_Client\CuteEditor\Configuration\ContextMenuMode\Full_noform.config
07:05:33 Info | No matching appSetting, applicationSetting, nor connectionString names were found in: C:\Octopus\Applications\pre\ScreeningDirect_test\0.0.1\CuteSoft_Client\CuteEditor\Configuration\ContextMenuMode\Minimal.config
07:05:33 Info | No matching appSetting, applicationSetting, nor connectionString names were found in: C:\Octopus\Applications\pre\ScreeningDirect_test\0.0.1\CuteSoft_Client\CuteEditor\Configuration\ContextMenuMode\None.config
07:05:33 Info | No matching appSetting, applicationSetting, nor connectionString names were found in: C:\Octopus\Applications\pre\ScreeningDirect_test\0.0.1\CuteSoft_Client\CuteEditor\Configuration\ContextMenuMode\Simple.config
07:05:33 Info | No matching appSetting, applicationSetting, nor connectionString names were found in: C:\Octopus\Applications\pre\ScreeningDirect_test\0.0.1\CuteSoft_Client\CuteEditor\Configuration\Security\Admin.config
07:05:33 Info | No matching appSetting, applicationSetting, nor connectionString names were found in: C:\Octopus\Applications\pre\ScreeningDirect_test\0.0.1\CuteSoft_Client\CuteEditor\Configuration\Security\Default.config
07:05:33 Info | No matching appSetting, applicationSetting, nor connectionString names were found in: C:\Octopus\Applications\pre\ScreeningDirect_test\0.0.1\CuteSoft_Client\CuteEditor\Configuration\Security\Guest.config
07:05:33 Info | No matching appSetting, applicationSetting, nor connectionString names were found in: C:\Octopus\Applications\pre\ScreeningDirect_test\0.0.1\CuteSoft_Client\CuteEditor\Configuration\Shared\Common.config
07:05:33 Info | No matching appSetting, applicationSetting, nor connectionString names were found in: C:\Octopus\Applications\pre\ScreeningDirect_test\0.0.1\CuteSoft_Client\CuteEditor\Dialogs\tag.config
07:05:33 Info | No matching appSetting, applicationSetting, nor connectionString names were found in: C:\Octopus\Applications\pre\ScreeningDirect_test\0.0.1\CuteSoft_Client\CuteEditor\Dialogs\Web.config
07:05:33 Info | No matching appSetting, applicationSetting, nor connectionString names were found in: C:\Octopus\Applications\pre\ScreeningDirect_test\0.0.1\PositionManagement\Web.config
07:05:33 Info | No matching appSetting, applicationSetting, nor connectionString names were found in: C:\Octopus\Applications\pre\ScreeningDirect_test\0.0.1\sso\Web.config
07:05:33 Info | No matching appSetting, applicationSetting, nor connectionString names were found in: C:\Octopus\Applications\pre\ScreeningDirect_test\0.0.1\sys\Web.config
07:05:33 Info | No matching appSetting, applicationSetting, nor connectionString names were found in: C:\Octopus\Applications\pre\ScreeningDirect_test\0.0.1\sys\PositionManagement\Web.config
07:05:33 Verbose | The package has been installed to: C:\Octopus\Applications\pre\ScreeningDirect_test\0.0.1
07:05:33 Verbose | If you would like the package to be installed to an alternative location, please use the ‘Custom installation directory’ feature
07:05:33 Verbose | Executing feature-class ‘Calamari.Deployment.Features.IisWebSiteBeforeDeployFeature’
07:05:33 Verbose | Creating ‘C:\Octopus\Applications\pre\ScreeningDirect_test\0.0.1\Octopus.Features.IISWebSite_BeforePostDeploy.ps1’ from embedded resource
07:05:33 Verbose | Executing ‘C:\Octopus\Applications\pre\ScreeningDirect_test\0.0.1\Octopus.Features.IISWebSite_BeforePostDeploy.ps1’
07:05:34 Verbose | Name Value
07:05:34 Verbose | ---- -----
07:05:34 Verbose | PSVersion 4.0
07:05:34 Verbose | WSManStackVersion 3.0
07:05:34 Verbose | SerializationVersion 1.1.0.1
07:05:34 Verbose | CLRVersion 4.0.30319.42000
07:05:34 Verbose | BuildVersion 6.3.9600.18968
07:05:34 Verbose | PSCompatibleVersions {1.0, 2.0, 3.0, 4.0}
07:05:34 Verbose | PSRemotingProtocolVersion 2.2
07:05:34 Verbose | PowerShell Environment Information:
07:05:34 Verbose | OperatingSystem: Microsoft Windows NT 6.3.9600.0
07:05:34 Verbose | OsBitVersion: x64
07:05:34 Verbose | Is64BitProcess: True
07:05:34 Verbose | CurrentUser: NT AUTHORITY\SYSTEM
07:05:34 Verbose | MachineName: WIN-TS44IUKND24
07:05:34 Verbose | ProcessorCount: 2
07:05:34 Verbose | CurrentDirectory: C:\Octopus\Applications\pre\ScreeningDirect_test\0.0.1
07:05:34 Verbose | CurrentLocation: C:\Octopus\Applications\pre\ScreeningDirect_test\0.0.1
07:05:34 Verbose | TempDirectory: C:\Windows\TEMP
07:05:34 Verbose | HostProcessName: powershell
07:05:34 Verbose | TotalPhysicalMemory: 8080988 KB
07:05:34 Verbose | AvailablePhysicalMemory: 5417428 KB
07:05:35 Info | Making sure a Website “secure.pre.sterlingdirect.com” is configured in IIS…
07:05:35 Verbose | Acquired mutex Global\Octopus-IIS-Metabase-Mutex
07:05:35 Verbose | Loading Application pool
07:05:35 Info | Application pool “secure.pre.sterlingdirect.com” already exists
07:05:35 Verbose | Acquired mutex Global\Octopus-IIS-Metabase-Mutex
07:05:35 Info | Set application pool identity: SpecificUser
07:05:36 Verbose | Acquired mutex Global\Octopus-IIS-Metabase-Mutex
07:05:36 Info | Set .NET framework version: v4.0
07:05:37 Verbose | Acquired mutex Global\Octopus-IIS-Metabase-Mutex
07:05:37 Verbose | Loading Site
07:05:37 Info | Site “secure.pre.sterlingdirect.com” already exists
07:05:37 Verbose | Acquired mutex Global\Octopus-IIS-Metabase-Mutex
07:05:37 Verbose | Loading Site
07:05:37 Info | Application pool “secure.pre.sterlingdirect.com” already assigned to “IIS:\Sites\secure.pre.sterlingdirect.com
07:05:37 Verbose | Acquired mutex Global\Octopus-IIS-Metabase-Mutex
07:05:37 Info | Setting physical path of IIS:\Sites\secure.pre.sterlingdirect.com to C:\Octopus\Applications\pre\ScreeningDirect_test\0.0.1
07:05:37 Verbose | Acquired mutex Global\Octopus-IIS-Metabase-Mutex
07:05:37 Info | Comparing existing IIS bindings with configured bindings…

I have added configuration xmlns:xdt=“http://schemas.microsoft.com/XML-Document-Transform
in the Transformed config file still not able to get results

Hi Jayraj,

Thanks for following up with those additional details. It doesn’t look like you’re hitting any error, so I suspect it could be something within the config files. You can test your transform files with this nifty tool from AppHarbor - do you get the same results when testing it out here?

https://webconfigtransformationtester.apphb.com/

After testing it out there, feel free to also attach your config files in this thread and I’ll be happy to look into it further. :slight_smile:

Best regards,

Kenny

Hi Kenneth.
I tried with online transformation tool but did not work
My application works with the same config file
is there any additional elements which are missing in my config file
attaching one transformed config Web.pre.config
root configs Web.config and Web.AppSettings.config
Web.AppSettings.config (12.2 KB)
Web.config (46.2 KB)
Web.pre.config (58.5 KB)

found error in the config file xdt:Transform=“Replace” xdt:Locator=“Match(name)”
was missing
thank you for your help

Hi Jayraj,

Thanks for following up and letting me know you’ve found the issue in the config file! That’s great to hear. You’re very welcome, and please don’t hesitate to reach out if you have any further questions moving forward. :slight_smile:

Best regards,

Kenny

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