Avoid Entire SettingsFileGenerator to SSO

Topics: Bindings File, Settings Management and SSO, Getting Started/Beginner, Tips and Tricks
Apr 17, 2015 at 7:40 PM
Edited Apr 17, 2015 at 7:41 PM
Hi ,

I have a question related to SSO. Currently I see that btdf deploys entire SettingsFileGenerator.xml to SSO.
Is there a way to avoid that ? We want to use sso only for our configuration items (key value pairs).
I can see that with current structure of xml spreadsheet , it would be difficult (perhaps not possible) , to distinguish between truly sso configuration settings and the settings used for binding processes.

Is there any work around for this ?

Apr 20, 2015 at 6:23 AM
That is handled by an MSBuild target named DeploySSO. You could try overriding the value of the property SettingsFilePath with a different XLS path just prior to DeploySSO, or you could blank out the values of the values you don't want in SSO. Keep in mind that everything stored inside SSO is encrypted at rest.

Rough example, in your .btdfproj:
<Target Name="PreDeploySSO" BeforeTargets="DeploySSO">
<Target Name="CustomSSO">
   <UpdateSSOConfigItem BizTalkAppName="$(BizTalkAppName)" SSOItemName="MyValueName" SSOItemValue="---" />
   <UpdateSSOConfigItem BizTalkAppName="$(BizTalkAppName)" SSOItemName="MyValueName2" SSOItemValue="---" />
Apr 20, 2015 at 3:48 PM
Thanks for the reply.

The first option of overriding SettingsFilePath is very convenient. However when I did that I get below error :

The command ""C:\Program Files (x86)\AHA.CR.ABF.Acknowledgement\1.0\Deployment\Framework\DeployTools\SSOSettingsFileImport.exe" "AHA.CR.ABF.Acknowledgement" /settingsFile:"..\SSOFileGenerator.xml" /userGroupName:"SSO Affiliate Administrators" /adminGroupName:"SSO Administrators"" exited with code -1.

The group names are correct. Am I missing something basic here ?

Apr 21, 2015 at 6:23 AM
With that path, SSOFileGenerator.xml needs to be located one folder above the folder containing the .btdfproj. Is that where you have it?
Apr 21, 2015 at 6:58 PM
Edited Apr 21, 2015 at 6:59 PM
Yes the path is correct. I have found additional error message :

Target DeploySSO:
            "C:\Program Files (x86)\AHA.CR.ABF.Acknowledgement\1.0\Deployment\Framework\DeployTools\SSOSettingsFileImport.exe" "AHA.CR.ABF.Acknowledgement" /settingsFile:"..\SSOFileGenerator.xml" /userGroupName:"SSO Affiliate Administrators" /adminGroupName:"SSO Administrators"
            Error reading file:
            System.InvalidOperationException: There is an error in XML document (3, 2). ---> System.InvalidOperationException: <Workbook xmlns='urn:schemas-microsoft-com:office:spreadsheet'> was not expected.
Just to check, I simply created a copy of SettingsFileGenerator and gave it a different name. The error persists. The error is not seen if I don't write this PreDeploySSO target.

Apr 21, 2015 at 7:06 PM
I left out the entire step of exporting the spreadsheet to the settings XML files. SettingsFilePath is an XML file exported from a settings spreadsheet. You would need to run an export on the additional spreadsheet, and determine which exported environment-specific settings XML file to use. That's what is typically determined by the deployment wizard GUI.

The simpler path is to use the other method of blanking out the settings that aren't wanted in SSO.

Apr 22, 2015 at 6:40 PM
Thanks again for the reply.

However , blanking out the settings manually would not be ideal. This is because we would need to write a lot of statements (basically all bindings variables ) in .btdfproj file
If possible , can you please help explain a bit more (the steps) to use the first option ? Thanks in advance.