Wednesday, August 11, 2010

RCDC Troubleshooting

The FIM portal can be extended by modifying XML files called RCDCs. There are a host of controls you can add to the FIM Portal pages, but they have to be hand crafted in by modifying XML then uploading it back to the FIM Service. There are decent resources on MSDN that show how to work with RCDCs:

FIM will let you upload XML files with errors, in return it will treat you to errors in the FIM Portal when you try to open a resource that applies that RCDC.

The FIM team provides an XSD to help troubleshoot this, and there are a number of ways to apply that XSD. Here is how to do it with Visual Studio.

  1. Save your RCDC XML to a file, then open it in Visual Studio
  2. Copy the XSD from the FIM MSDN site (see Appendix A: Default XSD Schema), and open it in Visual Studio:
    1. From the XML menu, select ‘Schemas’
    2. Find your saved XSD
    3. Set the ‘Use’ column to ‘Use this Schema
  3. Bingo!

Now that Visual Studio has the XML file open and the RCDC XSD it will find any issues with your RCDC. The sample below shows what an error looks like:

BTW – I really wanted this to be a cool PowerShell sample.  There is a cmdlet available to do just this but unfortunately the list of instructions was longer.  If you’re interested the Test-XML cmdlet can be downloaded as part of the PowerShell Community Extensions project on CodePlex.
It would look like this:

Returns true or false indicating whether or not RCDC.xml is well-formed and conforms to the schema defined in RCDC.xsd.
Test-Xml RCDC.xml -SchemaPath .\RCDC.xsd

No comments: