CODit

WCF-custom bindings & the 64-bits version of the BizTalk Adapter Pack for .Net 4.0

by vincent.rouet 20. July 2010 15:15

When installing the 64-bits version of the BizTalk LOB Adapter Pack, you may experience that the bindings (sqlBindings, SAPBinding etc...) do not show in the Binding Type drop down list when using a WCF-Custom Transport Type.

MSDN explains that the installation package only updates the 64-bits version of the machine.config. But the administration console runs in a 32-bits process and will not pick-up the installed binding types.

The solution is:

Up to BizTalk 2009 and the .Net Framework 3.5: Install both the 32-bits and 64-bits versions of the BizTalk Adapter Pack on top of the 64-bits WCF LOB Adapter SDK installation. This way, both machine.config (32 and 64-bits) will be updated. Note: only the 64-bits version of the LOB Adapter SDK must be installed.

From the 4.0 version of the adapter pack compatible for BizTalk 2010, this is not enough. Since the 32-bits version of the Adapter Pack only update the machine.config of the .Net 2.0 version, you must edit yourself the 32-bits version of the .Net 4.0 machine.config file (C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config). Refer to To register the adapter binding for the "how to". Then everything will work fine!

This might get fixed in the RTM version of the .Net 4.0 version of the adapter pack.

Vincent Rouet, CODit

Tags:

BizTalk | WCF

Permalink | Comments (13)

.NET 4.0 Windows Communication Foundation certified

by pborremans 1. July 2010 11:24

On 23 april I took the WCF 4.0 beta exam 71-513.

86 questions plus questions review...

In my opinion, the questions covered every feature (including the new ones).

To me, the REST questions were the most difficult, maybe because this is the feature I use least on projects. If you want to pass, don't forget to study the new 4.0 features!

Today I received a mail from Microsoft that I passed the exam :)

 

Peter Borremans

Tags:

Permalink | Comments (8)

TechEd US and Jon Flanders talking about next

by dbuysse 21. June 2010 14:26

If you're interested in all the content that was prensented at TechEd US a couple of weeks ago the place to go to is http://www.msteched.com/2010

Certainly one to watch is Integrating LoB Systems (SAP, Mainframe) with the Cloud Using Microsoft BizTalk Server and the Windows Azure AppFabric http://www.msteched.com/2010/NorthAmerica/ASI305

And as we had last week Jon Flanders on an AppFabric training here with CODit in Brussels we can verify if AppFabric is what he promised us a few years ago :-) Framework and Microsoft BizTalk Best Practices with an Eye Toward Oslo http://www.msteched.com/2008/NorthAmerica/techtalk_41

Tags:

AppFabric | Azure | BizTalk

Permalink | Comments (6)

Hosting workflow services in Windows Azure

by sam 17. June 2010 09:37

Since the latest release of the Windows Azure Development Kit (June), Azure provides support for .NET 4 applications, which is a real important step from the point of adoption, I believe.

The first thing we wanted to try was to host a XAMLX Workflow Service in a web role on Azure.

Example workflow service

I created a standard Workflow Service that accepted two parameters, on  one operation (Multiply) and returns the result of the multiplication to the client.  This service was called Calc.xamlx.

These are the steps I followed to make my service available.  I added the exceptions, because that’s typically what users will search for J

Enable visualization of errors

Standard behavior of web roles, is to hide the exception for the users, browsing to a web page.  Therefore, it is advised to add the following in the system.web section of the web.config:

<customErrors mode="Off"/>

 

Configure handler for Workflow Services

The typical error one would get, when just adding the Workflow Service to your web role and trying to browse it, is the following:

The requested url '/calc.xamlx' hosts a XAML document with root element type 'System.ServiceModel.Activities.WorkflowService'; but no http handler is configured for this root element type. Please check the configuration file and make sure that the 'system.xaml.hosting/httpHandlers' section exists and a http handler is configured for root element type 'System.ServiceModel.Activities.WorkflowService'.

We need to specify the correct HTTP handler that needs to be used for XAMLX files.  Therefore, we link the workflow services and activities to the correct Workflow Service ServiceModel handler.

To solve this, the following needs to be added to the web.config.

<configuration>
       <configSections>
             <sectionGroup name="system.xaml.hosting" type="System.Xaml.Hosting.Configuration.XamlHostingSectionGroup, System.Xaml.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
                   <section name="httpHandlers" type="System.Xaml.Hosting.Configuration.XamlHostingSection, System.Xaml.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
             </sectionGroup>
       </configSections>
       <!-- Removed other sections for clarity –>
       <system.xaml.hosting>
             <httpHandlers>
                    <add xamlRootElementType="System.ServiceModel.Activities.WorkflowService, System.ServiceModel.Activities, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" httpHandlerType="System.ServiceModel.Activities.Activation.ServiceModelActivitiesActivationHandlerAsync, System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
                    <add xamlRootElementType="System.Activities.Activity, System.Activities, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" httpHandlerType="System.ServiceModel.Activities.Activation.ServiceModelActivitiesActivationHandlerAsync, System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
             </httpHandlers>
       </system.xaml.hosting>
</configuration>


Enabling metadata exposure of the workflow service

To enable consumers of our workflow service to generate their proxy classes, we want to expose the WSDL metadata of the service, by providing the following configuration section in the web.config.

Notice the simplicity of configuration, compared to WCF3.5.  Making use of the default behaviors, allows us to only specify what we want to override.

<system.serviceModel>
       <serviceHostingEnvironment multipleSiteBindingsEnabled="true" >
             <serviceActivations>
                    <add relativeAddress="~/Calc.xamlx" service="Calc.xamlx"  factory="System.ServiceModel.Activities.Activation.WorkflowServiceHostFactory"/>
  
          </serviceActivations>
       </serviceHostingEnvironment>
       <behaviors>
             <serviceBehaviors>
                    <behavior>
                           <serviceMetadata httpGetEnabled="true"/>
                    </behavior>
             </serviceBehaviors>
       </behaviors>
</system.serviceModel>

Testing and publishing

After successfully testing locally in the Azure Development Fabric, I uploaded and deployed the package, using the new Tools in Visual Studio to my Azure test account.

Sam Vanhoutte, CODit

Tags:

Azure | AppFabric | Workflow | WCF

Permalink | Comments (19)