Paul's Petrov Whiteboard

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

  Home  |   Contact  |   Syndication    |   Login
  67 Posts | 1 Stories | 133 Comments | 30 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 code can be downloaded here.

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati
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

# re: Improved SSO Configuration Data Store Tool 12/2/2008 2:38 PM Krishna Jammula
Paul,
This is a great tool. There are couple of solutions for loading applications from SSO store. Simplest one is to call the stored procedure ssox_spGetApplications.
Regards,
Krishna

# re: Improved SSO Configuration Data Store Tool 12/3/2008 8:31 PM anon
appreciate ur work. managed to fix the select app so that it'll return a list of config apps... figured i'd contribute a little in case you haven't resolved it yet.

you have to set the flags/flagmask before calling getapplications.


ISSOMapper ssoMapper = new ISSOMapper();

AffiliateApplicationType appTypes = AffiliateApplicationType.ConfigStore;
appTypes |= AffiliateApplicationType.All;

IPropertyBag propBag = (IPropertyBag)ssoMapper;

uint appFilterFlagMask = SSOFlag.SSO_FLAG_APP_FILTER_BY_TYPE;
uint appFilterFlags = (uint)appTypes;

object appFilterFlagsObj = (object)appFilterFlags;
object appFilterFlagMaskObj = (object)appFilterFlagMask;

propBag.Write("AppFilterFlags", ref appFilterFlagsObj);
propBag.Write("AppFilterFlagMask", ref appFilterFlagMaskObj);


string[] apps = null;
string[] descs = null;
string[] contacts = null;

ssoMapper.GetApplications(out apps, out descs, out contacts);



# re: Improved SSO Configuration Data Store Tool 12/5/2008 12:16 AM Paul
Thanks! I uploaded new version including your fix and some UI changes.

# re: Improved SSO Configuration Data Store Tool 4/24/2009 3:44 PM Victor Fehlberg
Thanks for adding these features to the tool. I'm a colleague of Richard Seroter, and so I've always used that version until I got tired of re-creating the fields every time I needed to add a new config parameter. Your tool works great. I like the Browse SSO function too...

Thanks for adding these features! I know I'm going to use this tool a lot.

--Victor

# re: Improved SSO Configuration Data Store Tool 4/26/2009 11:21 AM Paul
I'm glad you find it helpful. Also check out custom MSBuild task for SSO configuration deployment: http://geekswithblogs.net/paulp/archive/2008/06/09/122746.aspx. It is very handy when doing automated BizTalk build/deployment.

Thanks,
Paul

# re: Improved SSO Configuration Data Store Tool 11/26/2010 7:38 AM Rod da Silva
Paul

Thanks for making these changes to a great tool.

Downloaded the latest (Oct/12/2010) build and found the following issues:

1) The .exe's in Release and Debug are different (have different functionality). For example the Release version has the "Browse" button whereas the Debug version doesn't.

2) The "Release" build's "Export Configuration" menu option pops an "Open" file dialog not a "Save File" dialog so I can't save the configuraiton as you describe.

3) Trying to open the source solution keeps giving me an error message (this may be a VS set up problem on my part - still investigating).

Anyway, bottom line is that right now I can't save the configuration and I can't modify the code since I can't currenlty open it on my machine.

FWIW,
Rod

Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification: