BizTalk Server 2009, Download, VirtualPC

BizTalk Server 2009 VPC

Available. Usable for demos, Hands-On labs and just getting a peak at BizTalk Server 2009 if you aren’t yet running it. Good news. Get it here.

Update 1 [2009-10-19]: This download is currently corrupt. Fix pending.
Update 2 [2009-10-24]: The download page has been removed. Links to files still work. Files still corrupt AFAIK.
Update 3 [2009-10-25]: Download is live again! Files are still corrupt.
Update 4 [2009-10-30]: I’ve download it 5 times. Still corrupt. Some people in other parts of the world seem to be able to download it ok, while others in the same country gets it corrupt. Cached somewhere?
Update 5 (2009-11-02): Got a question from a blog reader that downloaded the file today and found it corrupt if I had heard when a fix was comming. I haven’t.
Update 6 (2009-11-04): I’ve had multiple reports of people downloading the file, both those finding it corrupt and those who are able to use it ok. Try it if you have the bandwidth to spare. I haven’t been able to pinpoint any determining factor, though I do so hate things that are down to chance.

Update: Here are the links directly to the files, for loading in FDM or similiar.

Part 1
Part 2
Part 3
Part 4
Part 5
Part 6
Part 7
Part 8

.NET 3.5, Download, WCF

How-to: Get status from a windows service?

I was asked: “How can I call into a Windows Service to get it’s status?”

A little more background said that status was to be retrieved by clients (a website) on the same machine.

My response was to use WCF with the NetNamedPipeBinding. Since the recipient of my response, by his own accord, was unaccustomed to WCF, I decided to write up a small app that showed the concept.

The key thing here is that service expose an endpoint at an address that looks like this: net.pipe://localhost/ServiceMonitoringEndpoints/<name_of_service>. Name of service will be the same name as the ServiceName property of the ServiceInstaller component. This enables us to et the status of an arbitrary service just by knowing its name. First we look at the status through ServiceController and then, if the service is running, we call the WCF service to get the actual status, in this case in the form of a string. Pretty simple, wrapped up in a Library component ready to be used by both Windows Service servers and their clients. The Windows Service server is configured through its config file in my sample, but that’s something you can alter should that be one of your requirements.

Basically the server configuration is (mex of course not really necessary):

  <service behaviorConfiguration=“includeExBehavior”
    <endpoint address=“” binding=“netNamedPipeBinding”
              contract=“SharedMonitoringUtilityLibrary.IMonitoringService” />
    <endpoint address=“mex” binding=“mexNamedPipeBinding”
              contract=“IMetadataExchange” />

and the it uses one of ServiceHosts constructors to supply that takes type and address:

protected override void OnStart(string[] args)
    host = new ServiceHost(typeof(SharedMonitoringUtilityLibrary.MonitoringService),
        new Uri(“net.pipe://localhost/ServiceMonitoringEndpoints/MonitorMeWithWCFService_Service1/“));
    MonitoringService.Status = “Started at ” + DateTime.Now.ToString();
protected override void OnStop()
    if (host != null)

as you can see from the code above, I’m simply using a static method to supply the status to the running WCF Service. This particular point of interaction wasn’t my primary point of this post or code. A better option could be getting an instance of the host from the other direction using an overloaded ServiceHost and Get the host using OperationContext.InstanceContext.Host.. Another option might even be where the server is a client to it’s own service, using a set method to set the status. What you don’t want to do is make the service hostdependent. Just be aware that my choice above is clearly limiting, and that you have plenty of other options.

The client is dynamically configured to look for and call the service using the following method:

Binding binding = new NetNamedPipeBinding();
EndpointAddress endpoint = new EndpointAddress(
    string.Format(@”net.pipe://localhost/ServiceMonitoringEndpoints/{0}/“, serviceName));
MonitoringServiceClient client = new MonitoringServiceClient(binding, endpoint);
statusInfo = client.GetStatus();

Although it’s surrounded by other things as well in the actual sample code, like the call to ServiceController.

Here is the sample code.

It contains three projects. The Windows Service Server, the library and a simple console client. Compile the sample code, install the service using installutil and run the client. Now that you’ve validated it and it’s running you can begin expanding it.

Additional Resources:
Hosting WCF Service in Windows Service screencast
Hosting and consuming WCF services
NamedPipe activation

Adapters, BizTalk, Download, SFTP

Blogical SFTP Adapter v1.3

I’ve updated the Blogical SFTP Adapter previously released to codeplex by Mikael to include a couple of new features that have been requested and developed for or by customers or community.

  • The abaility to leave files on the source server and rename them instead of deleting them after get.

  • The ability to give a name, not only for the temp path but for the temp file, written to the source server through a send port, to be used for example when you want to directly to the destination folder and only want it to have it’s final name once fully written.

  • The ability to after you have put a file verify that it is really the same size (bytes) as the stream delivered to the adapter by BizTalk. This can be useful when you distrust the network or the receiving server, and causes a delete of the remote file and a following retry in BizTalk should the file sizes no match.

Read more and get the Blogical SFTP Adapter here.

With the above said, we are trying our best to react to requests and suggestions for improvement as well as direct bug reports. For minor or easily adjusted feature additions or bug fixes we are happy to help you right away. For major feature requests or custom development, we will try our best to make it happen, but things might be speedier if we set up a business arrangement around that, if you have such requirements. Please feel free to contact us, though all comments and suggestions should as a first option be posted on the discussions board of the Blogical SFTP Adapter at codeplex.

BAM, BizTalk, Download, Swedish, Usergroup

BUGS – BAM Session 2 – Samples

Here is the demo code, and presentation (in swedish) from the BAM talk I gave at the BizTalk User Group Sweden event on the 20th. Thank you all who attended, and to Precio for hosting it. Please contact me with any questions you might have about the samples, how to get them running and how best to go forward to utilize the benefits they demostrate. I’ll add an additional blogpost as soon as possible, describing the sample code. But until then I just wanted to put the code out there for you to look at if you would like to. This download does not include the Purchase Order demo that I used to demonstrate aggregations, that’s part of the Business Activity Monitoring Training kit, which I highly recommend, and that you can get here. It also does not include the WCF Calculator Interceptor sample, which is part of the BizTalk Server samples that Microsoft provides, get that one here. Also check out Mikaels post to get the BAM Session 1 slides and demo code, and read the explanation at the site (also in swedish).