O'Reilly logo

Microsoft Windows Workflow Foundation 4.0 Cookbook by Andrew Zhu

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hosting workflow in ASP.NET

In this task, we will create an e-mail sending workflow and run it in an ASP.NET site.

Getting ready

We need an e-mail sending workflow service hosted in IIS7. We can refer to the previous section, Hosting a workflow service in IIS7, in this chapter.

How to do it...

  1. Create an ASP.NET4 web application:

    Create an ASP.NET4 web application and name it HostingWorkflowInASPNET. Because we are going to host WF4 workflow in this website, we have to make sure it is an ASP.NET4 website. To check the version, right-click the project name HostingWorkflowInASPNET and select Properties.

  2. Author a Workflow:
    1. Add an activity to the website and name it Workflow.xaml.

      Author the workflow as follows:

    2. Set the properties for SendEmail1:
    3. Set the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required