1

Closed

Error in multi-tier environment: Could not load file or assembly 'Microsoft.IdentityManagement.WFExtensionInterfaces

description

After successfully implementing this in my lab, I am now trying to get this to work in a a milti-tier environment, where the FIM service is not on the same server as the FIM Portal. I have two of each.

I have run Install-FimPowerShellWF.ps1 on all 4 servers, and it would appear the the necessary ActivityInformationConfiguration objects have been created, and that FimExtensions.FimActivityLibrary.dll has been copied to ...\c$\Windows\assembly\GAC_MSIL\FimExtensions.FimActivityLibrary on each portal and fim service server.

Initially, my requests received PostProcessingError, claiming "Could not load file or assembly 'Microsoft.IdentityManagement.WFExtensionInterfaces" within the workflow remarks. I was also getting an error in the event log.

I determined that the fim portal servers had a "Microsoft.IdentityManagement.WFExtensionInterfaces.dll" in the GAC, but the fim service servers did not, so i copied the file and restarted the fimservice. Now the request status is "completed", but the script itself still won't fire, and I am getting the same error in event viewer.

I assume the FIM service needs yet another file(s), but am not sure what it might be.

Any assistance is welcome!

EventID below:
Log Name:      Forefront Identity Manager
Source:        Microsoft.ResourceManagement
Date:          8/13/2014 9:42:27 AM
Event ID:      2
Task Category: None
Level:         Warning
Keywords:      Classic
User:          N/A
Computer:      FIMSVC2.contoso.com
Description:
System.InvalidOperationException: Could not load file or assembly 'Microsoft.IdentityManagement.WFExtensionInterfaces, Version=4.1.3508.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
   at FimExtensions.FimActivityLibrary.PowerShellActivity.Execute(ActivityExecutionContext context)
   at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(T activity, ActivityExecutionContext executionContext)
   at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(Activity activity, ActivityExecutionContext executionContext)
   at System.Workflow.ComponentModel.ActivityExecutorOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime)
   at System.Workflow.Runtime.Scheduler.Run()
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft.ResourceManagement" />
    <EventID Qualifiers="0">2</EventID>
    <Level>3</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2014-08-13T13:42:27.000000000Z" />
    <EventRecordID>90924</EventRecordID>
    <Channel>Forefront Identity Manager</Channel>
    <Computer>FIMSVC2.contoso.com</Computer>
    <Security />
  </System>
  <EventData>
    <Data>System.InvalidOperationException: Could not load file or assembly 'Microsoft.IdentityManagement.WFExtensionInterfaces, Version=4.1.3508.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
   at FimExtensions.FimActivityLibrary.PowerShellActivity.Execute(ActivityExecutionContext context)
   at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(T activity, ActivityExecutionContext executionContext)
   at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(Activity activity, ActivityExecutionContext executionContext)
   at System.Workflow.ComponentModel.ActivityExecutorOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime)
   at System.Workflow.Runtime.Scheduler.Run()</Data>
  </EventData>
</Event>
Closed Aug 20, 2014 at 1:21 AM by CraigMartin
Issue resolved (Mike PM'd me)

comments

MikeCrowley wrote Aug 13, 2014 at 4:10 PM

I also ran the below (on the fim service servers) after copying the new DLL file, to be sure it was actually registered and not just copied.
$assemblyFileName = 'c:\windows\assembly\GAC_MSIL\Microsoft.IdentityManagement.WFExtensionInterfaces\4.1.3419.0__31bf3856ad364e35\Microsoft.IdentityManagement.WFExtensionInterfaces.dll'

$fullFileName = dir $assemblyFileName | select -expand fullname
[Reflection.Assembly]::LoadWithPartialName("System.EnterpriseServices") | Out-Null
[System.EnterpriseServices.Internal.Publish] $publish = new-object System.EnterpriseServices.Internal.Publish

$publish.GacInstall($fullFileName)
Restart-Service fimservice

CraigMartin wrote Aug 13, 2014 at 4:57 PM

Version mismatch?

the error is looking for 4.1.3508..

System.InvalidOperationException: Could not load file or assembly 'Microsoft.IdentityManagement.WFExtensionInterfaces, Version=__4.1.3508.0__, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified

MikeCrowley wrote Aug 13, 2014 at 5:45 PM

Thanks for the fast reply Craig! I had also just landed on this solution, and resolved my issue by updating my Microsoft.ResourceManagement.Service.exe.config file to:
    <dependentAssembly>
        <assemblyIdentity name="Microsoft.IdentityManagement.WFExtensionInterfaces" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="4.0.0.0-4.65535.65535.65535" newVersion="4.1.3419.0" />
      </dependentAssembly>
and it seems like I'm in business! So the net requirement was:
  1. Copy and register the Microsoft.IdentityManagement.WFExtensionInterfaces.dll file from a portal server to the fim service server
  2. Edit the config file as just mentioned
  3. Restart the fimservice service

CraigMartin wrote Aug 13, 2014 at 6:23 PM

Nice. One caution about modifying that part of the FIM Service configuration file; I think FIM Service updates might clobber that section of the file sometimes, so if this stops working after you've installed an update then be sure to check your configuration file.

MikeCrowley wrote Aug 13, 2014 at 6:39 PM

Good advice. I've got it in my notes to do just that. You can mark this issue as resolved (not sure how to do that).

wrote Aug 20, 2014 at 1:21 AM