Paul's Petrov Whiteboard

[BizTalk, Enterprise Application Integration, Business Process Automation, SOA, .NET]

  Home  |   Contact  |   Syndication    |   Login
  50 Posts | 1 Stories | 48 Comments | 47 Trackbacks

News

Archives

Post Categories

Image Galleries

BizTalk

Other

Richard Seroter published useful utility to store/retrieve BizTalk configuration settings in Enterprise SSO database. I added some more functionality to it.

First, I added Export/Import functions allowing to actually save values in the external XML file (Richard's implementation allowed storing only field names, calling for extra work should you delete and restore SSO aplication). I kept file format the same but added values stored as text nodes:

 

<sso>
  <application name="eCommerce.BizTalk.Configuration">
    <description>Configuration storage for eCommerce BizTalk applications</description>
    <appUserAccount>BizTalk Application Users</appUserAccount>
    <appAdminAccount>BizTalk Server Administrators</appAdminAccount>
    <contactInfo>http://geekswithblogs.net/paulp</contactInfo>
    <field ordinal="0" label="App1.SiteId" masked="no">2</field>
    <field ordinal="1" label="App1.UserId" masked="no">8</field>
    <field ordinal="2" label="App2.Timeout" masked="no">5000</field>
    <flags configStoreApp="yes" allowLocalAccounts="yes" enableApp="yes" />
  </application>
</sso>

 

New usage scenarios:

1. Saving configuration:

1.1 Create application; 
1.2 Save to XML; 
1.3 Manage application - Retrieve settings; 
1.4 Export to XML file created in (1.2).

2. Restoring previously saved configuration: 

2.1 Create application;
2.2 Manage application - Import configuration from file created in (1.4) ; 
2.3 Save Changes.

Accordingly, menu items Import/Export available when the Manage Application tab is selected only.

The second part of improvement is where I failed. I added "Select Application" button on the Manage Application tab to browse for available applications in SSO database. Currently, it won't find any ConfigStore application it will come back with "No Applications Found" message. I left this button on intentionally hoping that some would help me to solve this problem. It appears that neither ISSOMapper nor ISSOMapper2 return list of ConfigStore type SSO application. This API call will return application of types Individual, Group or Host Group but not ConfigStore which is the one we create using this tool. At least with the SSOFlag combination being set (0x140006). I tried different flag combinations but could not make it work. So please let me know.

The code can be downloaded here.

posted on Friday, May 16, 2008 3:54 PM

Feedback

# re: Improved SSO Configuration Data Store Tool 7/10/2008 1:41 PM Michael J.
Hi Paul,

This enhanced tool is great. Few questions:

1. When I click the "Select Application" button in the Manage Application tab, it tells me "no application found", even though I enter the application created prior to use this tool. I interpret that button as for selecting one of many Applications or take the one I entered in the Application name textbox. Do I miss something here?

2. In situation when the config XML file was not available, could it possible to recreate it from either tab on the Win Form, or could it possible the Export Configuraiton function not relying on pre-existing config XML file? This might be another feature to this great tool.

Thanks for the Great Job!
Michael

# re: Improved SSO Configuration Data Store Tool 7/11/2008 8:55 AM Paul Petrov
Michael,

Select Application supposed to show the list of available applications in database. But as explained in the last paragraph, I was not able to resolve this problem and left it dangling. I think I need to disable it until solution found not to confuse users.

If you have application in store and no XML file, you can export setting using Manage Application tab: 1. Type app name and click Retreive Settings. 2. Select File - Export Configuration menu.

Thanks,
Paul

# re: Improved SSO Configuration Data Store Tool 7/22/2008 12:45 PM Michael J
Paul,

Thanks for the confirmation. The revised version is working great overall. However, I run into an issue when I try to "Load Configuration From XML" into the multiple servers in domain environment. The configure xml file is similar to your sample.

At first, it complains "The Application Users account is not valid for application update.". Then, I add the full domain user name to the value of <appUserAccount> and <appAdminAccount> elements, like "domain_name\BizTalk Application Users". When I try load configuration from this xml, I got below error. So, I tried to delete the SSO Application and re-load configuration from the same XML, but I still got error. The "reserved" is the first dummy field[0]. Any suggestion?

Thx,
Michael

====== Error text ======

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentException: Item has already been added. Key in dictionary: 'reserved' Key being added: 'reserved'
at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
at System.Collections.Specialized.HybridDictionary.Add(Object key, Object value)
at BizTalk.Tools.SSOStorage.ApplicationManager.btnCreateApp_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase: file:///c:/WINDOWS/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
----------------------------------------
BizTalk.Tools.SSOStorage
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///D:/CAPS/Tools/BizTalk.Tools.SSOStorageRevised.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Microsoft.EnterpriseSingleSignOn.Interop
Assembly Version: 5.0.1.0
Win32 Version: 6.0.0245.0
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.EnterpriseSingleSignOn.Interop/5.0.1.0__31bf3856ad364e35/Microsoft.EnterpriseSingleSignOn.Interop.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------

# re: Improved SSO Configuration Data Store Tool 11/19/2008 3:07 PM Paul Petrov
Michael,

I don't know why it shows "reserved" as in code it's hardcoded as "dummy" string. As for reloading configuration from the XML make sure you follow recommended sequence and that you're running under the account that belongs to the domain group you claimed under App Admint Account field for the particular application.

Sorry for not responding earlier, I just discovered your post. Hope you solved that issue.

Best,
Paul

Post Feedback

Title:
Name:
Email: (never displayed)
Url:
Comments: 
Please add 5 and 1 and type the answer here: