Getting started with Windows Server AppFabric

Getting started with Windows Server AppFabric

In a previous post we introduced Windows Server AppFabric, a set of extensions to the Windows Application Server that “make it easier to build, scale and manage Web and composite applications that run on Internet Information Services (IIS).” AppFabric enhances the Application Server role in Windows by providing some features out of the box that customers previously have had to build by themselves. These include a scalable distributed cache and features for managing WCF and WF services. In this post I’m going to give you some tips for getting started with the service and workflow management features of AppFabric.


First, if you haven’t already done so, install AppFabric. You’ll find a pointer to the download page on the Windows Server AppFabric Development Center site.  Keep this site handy. This is the main site for AppFabric and is where you will find the latest news as well as links to samples, tutorials, and the support forum.


 Find the link to the download page on the Dev Center site.  Follow that link and take a few minutes to download and read the installation guide and release notes. Install any prerequisite software and Windows hotfixes that you may be missing. The prereqs include .NET 4 Beta 2 and Windows PowerShell v2. If you’re running on Windows Vista SP2 or Windows Server 2008 SP2 you’ll need to uninstall PowerShell v1 and download and install v2. Windows 7 and Windows Server 2008 R2 include PowerShell v2 by default. See the installation guide for details.


On the download page find the Setup package for your machine’s operating system and architecture, and run the Setup wizard. We’ll use only the service and workflow management features of AppFabric for now so we require only the Worker feature to be installed, but install and configure the distributed cache features if you will use those later.


The Dev Center site links to a tutorial that walks you through deploying, configuring, monitoring, and managing a WF service.  The tutorial does a nice job introducing most of the service and workflow management features of AppFabric and is well worth the time to go through. The first version of the tutorial has you use the IIS Manager tools for the exercises, while the second version has you complete the tasks using PowerShell cmdlets and scripts. The tutorial comes with a sample application that you will deploy using the Web Deployment Tool. You’ll hear us highlight this tool quite a bit as we talk about managing IIS hosted services. The tool is powerful for synchronizing applications and IIS settings from one machine to another.


If you just want to see some of the features in action, though, you can create a simple workflow service project in Visual Studio 2010 and run it in IIS. Create a new project using the WCF Workflow Service Application template. This will give you a workflow service with a GetData operation that receives a message and sends a response. On the project properties, view the Web tab and configure the application to run in IIS instead of the Visual Studio Development Server.  If you’re running Visual Studio elevated as an administrator and you have the IIS 6 Management Compatibility feature of IIS installed you can create a new virtual directory directly from the Web tab. Otherwise, use IIS Manager to create the virtual directory, pointing it to the root directory of your Visual Studio project. (This is where you’ll find the web.config and XAMLX files.)


Once you have your application running in IIS you can see and manage its services with AppFabric. Open IIS Manager and expand the tree. Click on the root node and find the Application Server Extensions for .NET 4 modules in the center features pane. With those modules you can view service activity on the Dashboard, view endpoints, and configure services. Go back to your project in Visual Studio and add a Delay activity at the end of your workflow to keep instances alive for a few minutes so you can watch them go from the Active to Idle states in the Persisted WF Instances section of the Dashboard and see the instances show up in the WF Instance History section as they complete.


AppFabric adds some powerful features to the Windows Application Server. Install the Beta 1 and go through the tutorials to learn about the features in depth, or try a simple scenario on your own to get familiar with the features. If you run into any problems or have feedback to share with us please do so in our forum  or via our Connect page.

Webcast – Building a Demand Driven Supply Chain

Webcast – Building a Demand Driven Supply Chain

As part of the “BizTalk In Your Industry” webcast series that Microsoft Canada is running, we are hosting a session tomorrow focused on the retail and manufacturing industries. I am very pleased to have supply chain experts “QLogitek” joining us to speak about how organizations can enable a demand driven supply chain. The full session abstract and registration link is below. If you can’t join us live, don’t worry. We will be recording this session and it will be available on-demand. However, if you can make it, we’d love to have you join.

December 1st at 2:00 PM EST, Register now for the Webcast

A great way to connect your business systems and partners.

The top two business challenges facing retail supply chain executives in this economy are increased lead times for the delivery of merchandise to stores and low inventory turns, according to Aberdeen’s Retail research.

These business challenges can cause higher supply chain costs and lead to lower than average attainment of gross margin return on inventory (GMROI), fill rate, cash conversion cycle, and forecast accuracy.

Optimized Demand Management activities help lower operating costs. Organizations can achieve best-in-class status by automating and integrating Forecasting, Sourcing & Replenishment activities with their suppliers and customers. 

Learn how a Demand-driven Supply Chain Network (DDSN) helps the extended retail enterprise integrate its suppliers & customers to its core Demand Management processes. 

Register for this webcast co-presented by Microsoft and QLOGITEK. This webcast will feature an Enterprise Retail Organization using a DDSN framework and leveraging a Microsoft-based platform to help build a best-in-class retail operation.

Cheers and keep on BizTalking

Peter

Microsoft AJAX CDN – Now with SSL Support

Microsoft AJAX CDN – Now with SSL Support

Back in September I blogged about the new Microsoft AJAX CDN (Content Delivery Network) service that the ASP.NET team is now providing.  The CDN provides edge caching support for AJAX libraries (including jQuery and ASP.NET AJAX).  The service is available for free, does not require any registration, and can be used for both commercial and non-commercial purposes.  It offers a great way to speed up your external facing web-sites.

SSL Support Now Provided

One of the features in September that we said was coming (but which was not available at the initial launch) was SSL support for scripts served off of the CDN.  This is necessary for scenarios where you have SSL enabled pages on your site, and you want to reference a script library from the Microsoft CDN and avoid a “This page contains both secure and non-secure items” warning message being displayed to end-users visiting your site.

SSL support is now enabled with the scripts hosted on the Microsoft AJAX CDN.  Simply use an “https” moniker with any script references on your site that point to the CDN, and they will now be served over SSL.  For example, below is how you can reference jQuery over SSL:

   <script src="https://ajax.microsoft.com/ajax/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>   

The Microsoft AJAX CDN documentation has recently been updated with more details about it.  You can visit it here to learn more. It lists all of the libraries currently offered via the CDN.  We are steadily adding more libraries to it and will update the page as new ones become available.

Hope this helps,

Scott

P.S. In addition to blogging, I’m also now using Twitter for quick updates and to share links. Follow me at: twitter.com/scottgu

BizTalk, WCF and the Bad Gateway

BizTalk, WCF and the Bad Gateway

We ran into an interesting problem a couple of days ago and I decided it would be worth posting the solution in case anyone else runs into it.
The scenario involves a Windows Service communicating with a BizTalk WCF endpoint which is hosted using WCF-CustomIsolated and some fairly complex custom bindings, notably using X.509 Mutual Certificates. […]

Using BizTalkCop in BizTalk 2009

Using BizTalkCop in BizTalk 2009

[Source: http://geekswithblogs.net/EltonStoneman]

The static analysis of BizTalkCop runs on compiled BizTalk assemblies, and as BizTalk 2009 projects follow the standard Visual Studio format, it’s simple to include the rules for BizTalk projects in Visual Studio 2008.

Setup

1. Make the rules available to Visual Studio

The rules assembly BizTalkCop.Rules.dll needs to be in the static analysis directory of Visual Studio – by default:

C:\Program Files\Microsoft Visual Studio 9.0\Team Tools\Static Analysis Tools\FxCop\Rules

Either copy the assembly from an existing installation (which will be in C:\Program Files\Microsoft FxCop 1.36\Rules by default), or select the Rules path as the destination folder on a new install.

2. Enable the BizTalkCop rules for your project

In the project settings, select “Enable Code Analysis on Build”, and select the BizTalkCop rules:

Then when you run a build, the BizTalkCop messages will be shown as warnings:

If you’re particularly Draconian, you can set “Treat Warnings as Errors” for one or all BizTalkCop rules, so any failures are shown as errors, and will break the build.

Differences in Visual Studio and FxCop functionality

You can use Visual Studio’s Suppress Message functionality to ignore a particular rule for a particular artefact. Suppressing works for both the “In Project Suppression File” and the “In Source” options, but most of the source is generated so the suppressions will be lost when they change – adding to Project Suppression File is safer.

Visual Studio doesn’t allow you to configure rule values as FxCop does. The dynamic BizTalkCop rules which run against application bindings use configured values for the application name and management database, so they won’t function through Visual Studio. (See Introducing: BizTalkCop for information on configurable rules). Also if your standards differ from the default configured values, you’ll need to change the rules in code and rebuild to get the new values through Visual Studio.

A good compromise would be to use the static rules in Visual Studio at development time, then have a separate FxCop project which includes the dynamic rules, and runs as part of the build process once the BizTalk application has been deployed to the build/staging environment.


Note to self: Remeber BOOTREC.EXE

Note to self: Remeber BOOTREC.EXE

There I was rebuilding a new VPC Image (which I’m running in Virtual Box) and the
base VHD is a parent of 16GB.

For an install of Win2008, VS.NET 2010, SQL2008… it’s pretty much game over with
a full disk.

I spent the last 3 days shifting files around to clear space

So tonight I bit the bullet and Ghosted the partition over to a 200GB – much
better 🙂

This issue I had was that the boot environment was different and ‘in the good old
days’ we’d change the BOOT.INI and bobs your uncle.

Welcome to Vista and beyond…as you know we have the BCD Store

There’s a very common tool (blogged about everywhere) called BCDEDIT.EXE which
if GUIDs are your think and long command line options, you can ‘manually’ manage the
Store (there’s also a bunch of 3rd party apps that say ‘lets do this from the UI’
– I’m in recovery mode)

For the life of me I couldn’t remember the tool I used last time this happened to
me, which I said ‘don’t forget Mick’.

BOOTREC /rebuildbcd

Too easy…then if you can’t sleep you could also crack onto BCDEDIT.EXE to ‘customise’
some aspect. (e.g. booting up off multiple logical CORES)

Bootrec

Bootrec

Bootrec

I will not forget Bootrec

Presenting in Europe Next Week

Presenting in Europe Next Week

I’m off to Europe next week to do a bunch of technical presentations.  I’m presenting for 5-6 hours in a bunch of different cities, and will be doing talks that cover: ASP.NET 4 and VS 2010, ASP.NET MVC 2, and Silverlight 4.

Below are details on the different cities I’m visiting, and how to register to attend the talks:

I’ll also be attending the BizSpark Camp in Paris on December 8th and will be doing a presentation there as well:

Hope to see some of you at once of these events in person!

Scott

P.S. In addition to blogging, I’m also now using Twitter for quick updates and to share links. Follow me at: twitter.com/scottgu

My ESB Toolkit How-to Videos are now on MSDN

My ESB Toolkit How-to Videos are now on MSDN

Hi all. I’ve always used Skydrive and this blog to host my ESB Toolkit how-to videos but I have had a number of people ask me to find a better place for them to live. Well, I am now pleased to say that we are moving them to the ESB Toolkit page on MSDN. If you browse over to http://msdn.microsoft.com/en-ca/biztalk/dd876606.aspx and check out the video section, you will see the first three videos from my series. In order to post these to MSDN, I had to re-film them use a better resolution and screen capture rate. I also had to sanitize some of the sample data that I used. Therefore, only three are currently available since I haven’t found the time to redo all of them yet. I hope to migrate the remaining ones to the MSDN required format soon. Also, I plan to do at least one more in the series which shows how to create new messaging level services that can snap into the ESB environment.

So in short, if you’ve come here to download any of the videos, I encourage you to try the MSDN site first.

Cheers and keep on BizTalking

Peter