Tuesday, September 11, 2012

Uninstalling Enterprise SSO (Biztalk 2006 R2)


Today in one of my development Virtual Machines I tried to uninstall Enterprise Single Sign On and obtain the following error:
"You cannot uninstall Microsoft Enterprise Single Sign-On because there are applications installed that depend on that product. Please uninstall the dependent applications before uninstalling Microsoft Enterprise Single Sign-On"
After some search around the log files I didn't manage to find out which applications depended on SSO, so I change my search to the web and found this link:
http://msdn.microsoft.com/en-us/library/ee251734%28v=bts.10%29.aspx
This link is related to the version 2004 of Biztalk, so the registry keys mentioned didn't help me.
I also found a post from a Portuguese colleague:
http://msdn.microsoft.com/en-us/library/ee251734%28v=bts.10%29.aspx
Which I tried and had no success.
Almost giving up I decide to dig a little on the registry and found this interesting location:
HKLM\SOFTWARE\MICROSOFT\ENTSSO\DependentProducts
On this location I had one key related with Microzoft Biztalk Server 2009 and thought: “oh that’s right I forgot I had Biztalk 2009 version installed on this machine in the past”. I think something on the uninstall process of this version gone wrong and let this key behind, so I decide to make a registry backup and delete this key. After this I tried to uninstall ENTSSO and managed to do it with success.
Hope this could help someone.
Best Regards.


Tuesday, July 3, 2012

CRM 4 - ArgumentException: An item with the same key has already been added and MessageProcessor fail to process message 'Update' for 'organizationui'


Today I faced a problem with a CRM 4 environment.
I was trying to import the entity Incident from Testing environment to our Quality environment and received an error when trying to import the customization on our Quality environment.
I tryed another thing with our Incident entity of Quality, I tried to change the Incident form and Save the changes and received an error.
After this I turned on the CRM log and tried to obtain more information regarding this problems.The problems I detected with CRM log were:
- ArgumentException: An item with the same key has already been added 
- MessageProcessor fail to process message 'Update' for 'organizationui'.
After this I made a search in Google and found this:
Witch made me find another link:
With this two links and CRM log I managed o find a third link:
With this last link I managed to achieve the following query:
select * from OrganizationUIBase as organizationui0
where (organizationui0.FormId = 'dc89c020-8bda-48c4-8b89-f2aaf9e48670')
The result of this query was:

After analise the 3 rows I found out that the first row had the FormXml field with a invalid XML and this was the cause of my problem.
The solution was to delete this line.
After a backup of course.

Just as a note, this was the second problem I faced, the first one was resolved by the first link above and I'm not talking about it because there is lot of information on the link and on the net about it.

Monday, March 5, 2012

Biztalk 2006 to Biztalk 2010


Problems found:
·         File btproj.user is screw up the path of some references (dll) of the project.
Solution: Delete this file and you should be done.
·         Some webreferences of my schemas project are creating problems in some other projects that use some of this webreferences.
Solution: Remove webreference and use “Add Generated Itens”, now you have to correct all the maps that use the schema from the deleted webreference (good luck with this, I should have more than 250 maps to correct).
This solution is not suitable for me, I’m trying to find another solution. Don’t know why the “Add Service Reference”-> Advanced->Add Web Reference is not working (none of the schemas from the webservice webreference have changed).
I found why the "Add Web Reference” is not working for this webreference. Look at this:

As you can see the operation of adding the webreference created two schemas (xsd), this is what is causing me problems. Look at the first XSD:

This is not what I want. This is the content of Reference.xsd. What I wanted is the content of the Reference1.xsd (to be available in order for me to choose witch Schema to use from this WebReference).
Solution: delete the Reference.xsd recompile the schemas project and everything runs as expected (of course this deletion will have some implements, I just don’t know witch yet. I do not remember using any schema with this ArrayOfString maybe this operation will not back fire at me in the future if it backfires I will post some more information about this operation).
Solution: rename the Reference.xsd to Reference2.xsd and Reference1.xsd to Reference.xsd recompile the schemas project and everything runs as expected. Don’t forget to change the name of .xsd.cs files too (Reference.xsd.cs to Reference2.xsd.cs and the Reference1.xsd.cs to Reference.xsd.cs). Don’t forget to edit the .odx file and replace all Reference1 to Reference2, then all Reference1 to Reference (this kinda of things brings me back memories of Biztalk 2004 where we had sometimes to edit the .odx file to resolve some bugs lol).
I also had to Add Reference “System.Configuration” to the schemas project in order to rebuild it with sucess.
Some colleagues told me I would have problem using this schema when working with messages on the orquestration, but I had none:

As you can see I still have access to the schemas inside the schemas dll project.
Note:  I noted a new file app.config that seems only a redirection file.
Note2: I don’t think this is a problem related with the upgrade from BTS2006. More about this:

Other way should use something like this:
But I think I had to tweak the result class with the intent to give the result class the same name my old webreference had, because if it hadn’t the same name then the path to the schema would not be the same and I had to remake all the maps again.
Don’t know how hard this would be and if it would work because I didn’t try this one.