Kentico Version: 13.0.133
Staging Config: Using Username/Password
Methodology: MVC
When Did it Start?: Unsure, we don't use staging very much.
Hosting: Azure App Service/Azure SQL
We are having an issue where when we try to stage content from our dev Kentico environment to production, it is throwing an error. Note that for the site that exists at the root (just: cmsdev.company.com), staging works fine. The site thats having the issue is configured as follows:
-
Site Admin URL: cmsdev.company.com/cc
- dev admin
- In Azure App Service, this is set up as a virtual application, from /cc to site\wwwroot\CMS)
-
Staging Server URL: https://cms.company.com/CMSPages/Staging/SyncServer.asmx
- prod admin
- using username/password
- also tried "/cc" on the URL, but that didn't do anything
- The URL test works fine - says it can connect.
Here's the error:
Preparing the tasks for objects of type(s) 'cms.document'...
Synchronizing the tasks...
Synchronizing 'Update page 2018 - 2-3' task
Message: WSE032: There was an error loading the microsoft.web.services3 configuration section.
Exception type: System.Configuration.ConfigurationErrorsException
Stack trace:
at Microsoft.Web.Services3.Configuration.WebServicesConfiguration.get_Current()
at Microsoft.Web.Services3.Configuration.WebServicesConfiguration.get_MessagingConfiguration()
at Microsoft.Web.Services3.WebServicesClientProtocol..ctor()
at CMS.Synchronization.WSE3.Server.SyncServerWse..ctor()
at CMS.Synchronization.WSE3.SyncClient.get_Service()
at CMS.Synchronization.WSE3.SyncClient.RunTask(StagingTaskInfo taskObj)
Message: The entry 'UsernameToken' has already been added.
Exception type: System.Configuration.ConfigurationErrorsException
Stack trace:
at System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult)
at System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
at System.Web.Configuration.HttpConfigurationSystem.GetApplicationSection(String sectionName)
at System.Web.Configuration.HttpConfigurationSystem.GetSection(String sectionName)
at System.Web.Configuration.HttpConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String configKey)
at System.Configuration.ConfigurationManager.GetSection(String sectionName)
at Microsoft.Web.Services3.Configuration.WebServicesConfiguration.get_Current()
Synchronization failed, see synchronization log for details.
I found some resources related to this error: https://docs.kentico.com/k11/configuring-kentico/managing-sites/setting-up-multiple-websites/configuring-nested-websites. We don't use nested sites, though... and this article doesn't have a Kentico 13 analog, so I assume it's irrelevant. It does point to where the problem might be though - in our web config. I tried fiddling with his config - removed the x509 part, changed the localName... removed it entirely... but all that just caused different errors.
<microsoft.web.services3>
<security>
<securityTokenManager>
<add type="CMS.Synchronization.WSE3.WebServiceAuthorization" namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" localName="UsernameToken" />
</securityTokenManager>
<x509 allowTestRoot="true" verifyTrust="true" />
</security>
<policy fileName="wse3policy.config" />
<diagnostics>
<trace enabled="false" input="InputTrace.webinfo" output="OutputTrace.webinfo" />
</diagnostics>
</microsoft.web.services3>
I also went through the documentation for setting up staging and debugging staging, and didn't find anything obviously missing: