I went through the process of installing and getting AppFabric working on my local machine based on information I gathered in my Windows Workflow 4.0 and Windows Server AppFabric – My Resources for Getting Started post. I then had to create a document that instructed other developers on my team how to install and get our workflow app up and running. Here’s the script (as I think it would be useful to anyone else just getting started). I know that not all the steps are necessary (e.g. installation of the persistence store can be done within the AppFabric Configuration Wizard) but I felt these were the more intuitive steps to letting developers know what was going on under the hood. Here goes nothing:
- Download and install the version of Windows Server AppFabric appropriate for your machine (see Additional Information section at bottom of the page to determine which to install)
Note: At the end of installation you will see the “See recommended updates” link at the top. Click it and install the updates. Also, uncheck the “Launch configuration tool.” checkbox. We will configure this in a separate step to add clarity.
Installing Persistence Store (Database)
- Create a new database (“SQLPersistenceStore”, but name is really unimportant), run the scripts (provided by Microsoft) to create the schema and logic for this database. Manually run the following scripts, located in %SystemRoot%\WINDOWS\Microsoft.Net\Framework\v4.0.30319\SQL\en\ or %SystemRoot%\WINDOWS\Microsoft.Net\Framework64\v4.0.30319\ if you are running a 64 bit operating system: SqlWorkflowInstanceStoreSchema.sql and SqlWorkflowInstanceStoreLogic.sql
- Create a SQL User account to connect to the newly created database. The user account needs to have db_reader and db_writer permissions as well as be given ownership of the System.Activities.DurableInstancing schema (created in the above step).
- Run the Configure AppFabric application (now installed in your start menu).
- (Optional? I am not sure that the monitoring service is necessary but I think that it is what creates the add-in in IIS Manager to view the persisted instances) On the ‘Hosting Services Tab’ of the Windows Server AppFabric Configuration Wizard’ screen, check the ‘Set monitoring configuration’ checkbox, select the System.Data.SqlClient item from the ‘Monitoring provider’ drop-down and click ‘Configure’
- On the ‘Windows Server AppFabric Monitoring Store Configuration’ screen, click the ‘Register AppFabric monitoring store in root web.config checkbox, select the database (created in step 1 above) in the Connection String section, and select the ‘SQL Server authentication’ option in the ‘Security Configuration’ section, providing the username and password created above.
- Back on the Hosting Services Tab, check the ‘Set persistence configuration’ checkbox, select the sqlStoreProvider item from the ‘Persistence provider’ drop-down and click ‘Configure’
- On the ‘Windows Server AppFabric Persistence Store Configuration’ screen, click the ‘Register AppFabric persistence store in root web.config checkbox, select the database (created in step 1 above) in the Connection String section, and select the ‘SQL Server authentication’ option in the ‘Security Configuration’ section, providing the username and password created above.
- Back on the ‘Windows Server AppFabric Configuration Wizard’, click the ‘Next >’ button to complete the wizard.
Creating the Virtual Directory
- Open IIS Manager (inetmgr from the ‘Run’ prompt) and create a new Application under the Default Website node and pointing the virtual directory to the workflow project folder in your development environment (e.g. c:\dev\MyWorkflowApp\source\application\WorkflowProject).
the series on WF is interesting. we are also doing some WF stuff as well…. actually just did a sweet demo on it today (not me) anyway, good to know what happens behind the scenes.