Windows AppFabric Server hosts WCF and WF services in the Windows Process Activation service (WAS) process space. Much of the content and samples for AppFabric shows developing your Web site and services in Visual Studio with the ASP.NET Development Server and then deploying the solution to IIS and AppFabric.  While this works great for many solutions, there may be cases where you want to use IIS/AppFabric in your development environment.  As things exist today the only way to add a WCF Workflow Service to a Web site is to create a parallel Web project (with the same namespace). You then copy the file over to the Web site and add it to the solution in Visual Studio 2010.  At that point you can edit the content.

Here are more details on this process. To get started you need to prepare your computer with IIS and the appropriate settings for Visual Studio 2010 development. All WCF Workflow Services live in Web "sites" at production time.  Visual Studio 2010 Web "projects" use the ASP.NET Development Server at development time.  If you want to use IIS/AppFabric at development time you need to use Visual Studio 2010 to create a Web site (not a Web project).

 Task 1 - Create Your Web Site in IIS with Visual Studio

  1. Run Visual Studio 2010 as Administrator. (Tip: In Windows 7 you can press CTRL+SHIFT and click the icon to run as administrator.)
  2. Select File / New / Web Site.
  3. In the lower-left corner of the new project dialog box, select the Web location HTTP.
  4. Browse to or enter the name of the Web site.  In this case, I’m going to name it Website and click OK to create the Web site.
  5. Open IIS Manager and you will now see Website under your Default Web Site.
 Task 2 - Create and Test Your Web Service
  1. Right-click your project and select Add New Item.  
  2. Select WCF Service from the list of templates.
  3. Add your service using the default name Service.svc
    Note: You will notice that the service is a little different than it is when you use a Web project.  There is a folder called App_Code that contains your .cs or .vb files and the .SVC file is in the root of the Web site.
  4. Right-click the .SVC file and select View in Browser.
    Note: The URL of your Web service is
  5. Open a Visual Studio 2010 command prompt and run the WCF Test Client to test your service:
  6. In the WCF Test Client, select File / Add Service and enter the URL to your Web service http://localhost/WebSite/Service.svc.
  7. To invoke your service, double-click the DoWork method in the left pane and click Invoke in the right pane. If you get a security warning, click OK to proceed.
 Task 3 - View Your Service in Windows Server AppFabric

If you have installed and configured Windows Server AppFabric correctly you should now have some interesting information about your service available in IIS Manager.

  1. Open IIS Manager
  2. Navigate to your Web site under Default Website.
  3. Double-click the Services icon. 
  4. Click your service and you will see more information about it in the lower pane. 
  5. If you click the Monitoring Statistics tab you can see information about how your service has been performing.
  6. Click the back button and then double-click the Endpoints icon. Click the endpoint and you will see information about the endpoint.
  7. Click the back button and double-click the AppFabric Dashboard icon.
  8. The AppFabric Dashboard retrieves data from the monitoring store and provides information about services and workflows in the selected Web site.  In our case we tested our service in the WCF Call History and we have one completed call to Service.svc.