Known Issues with the BAM WCF and WF Interceptors

This section provides information about known issues that you may experience when using the BAM interceptors for Windows Workflow Foundation or Windows Communication Foundation.

Intercepting a dynamically generated WCF assembly hosted in IIS

When you are using IIS to host an embedded Windows Communication Foundation application (for example, a service file that specifies the assembly source), the WCF assembly will be dynamically generated, assigned an arbitrary file name, and placed in the asp.net temporary folder. Since the interceptor configuration file requires manifest information and since wildcard characters or other dynamic methods for specifying the manifest are not available with interceptor configuration files, you must recompile your service and then build your interceptor configuration file or redeploy your interceptor configuration file after you have deployed all of the asp.net web pages containing embedded WCF code.

Use of the BAM interceptor for Windows Workflow Foundation is not supported in Office and Sharepoint Server

Both office and Windows Sharepoint Server do not read from the application configuration file when initializing the WF runtime. As a result, the BAM interceptor for WF may be configured for an application but it will not be loaded into the workflow runtime when hosted within these environments.

Client service locks when intiating a distributed transaction

If the service operation will not be participating in the transaction initiated by the client and the client is invoking the service from the context of a transaction scope, a deadlock could result, especially if there is data being collected from the client before the send request and from the service by the receive request for the same activity.

To avoid this situation, you should specify that the client does not participate in the transaction by declaring "Enlist = false" in the client ConnectionString attribute for the BAM behavior extension in the client's app.config file as demonstrated below.

<behavior name="bamClientBehavior">  
  <bamClientBehaviorExtension ConnectionString="Integrated Security=SSPI;Initial Catalog=BAMPrimaryImport;Data Source=.;  Enlist=false"  PollingIntervalSec="1500" />  
</behavior>  

Open WCF Channel Before Sending a Message when BAM Interceptors are used

When BAM interceptor is enabled for WCF with BasicHttp binding, proxy should call proxy.Open() to explicitly open the channel. If the channel is not opened explicitly, BAM interception can fail with an exception.