Configure WCF and WF for Server, Site, Application, or Virtual Directory: Workflow Persistence Tab
Use this tab to configure default workflow persistence settings at server, site, or application levels. This tab is available in Configure WCF and WF for Server, Configure WCF and WF for Site, Configure WCF and WF for Application, and Configure WCF and WF for Directory dialog boxes. You can launch the configuration dialog box in one of the following two ways:
Right-click server, site, application, or virtual directory, point to Manage WCF and WF Services, and then click Configure.
Click server, site, application, or virtual directory, and then click Configure from the Actions pane.
Select the SQL Server Workflow Persistence option to enable persisting service instances to a SQL Server database. Select the Custom or None option to use an instance store other than a SQL Server database or to not to use the persistence feature at all. When you associate a SQL Server persistence provider with a service, you must specify a connection string for the provider to connect to a SQL Server 2008 or 2005 persistence database. You can configure advanced SQL persistence features such as keeping instances in the persistence store after their completion and encoding instance state information using the GZip algorithm using the Advanced Persistence Settings dialog box that you can launch by clicking the Advanced button.
Custom or None
Select this option to associate an instance store other than a SQL Server database with the service or to not to use the persistence feature at all.
SQL Server Workflow Persistence
Select this check box to enable persisting instance state information to a SQL Server 2008 or 2005 persistence database. You must specify a value for the SQL Server store field when you select this option.
If you do not have net.pipe protocol enabled for the application containing the service and you switch from Custom or None option to SQL Server Workflow Persistence option and the configuration dialog box is for the application, virtual directory, or service levels, you will see the following warning message in a message box.
If you click OK on the message box, select instance store from the drop-down list, and then click OK or Apply on the Configure Service dialog box, the net.pipe protocol is enabled for the application. To verify that the net.pipe protocol is enabled for the application, right-click the application name, point to Manage Application, and click Advanced Settings, and confirm that net.pipe protocol is listed in the Enabled Protocols field.
You will also see the following warning message at the top of the tab in the preceding scenario.
You also see this warning message if you disable net.pipe protocol on the application after you enabled SQL persistence for the service, open the Configure Service dialog box and switch to the Workflow Persistence tab.
If you do not have net.pipe binding enabled for the Web site containing the service and you switch from Custom or None option to SQL Server Workflow Persistence option and the configuration dialog box is for the site level, you will see the following warning message at the top of the tab.
To enable net.pipe binding for the Web site, perform the following steps:
Additionally, you will always see the following warning message at the server level. You will not see this message at the site level. However, at the site level, as mentioned earlier in this topic, you will see a warning message when the net.pipe binding is not enabled for the site.
SQL Server store
Select the instance store that you want the SQL persistence provider to use. The instance stores in the drop-down list are defined either locally at the selected level or inherited from the higher levels (application, site, root Web.config, or machine.config) in the IIS configuration hierarchy. An instance store defined in the configuration file points to a connection string that the SQL persistence provider uses to connect to a SQL Server 2008 or 2005 persistence database.
Click this button to launch Advanced Persistence Settings dialog box, which allows you to configure advanced persistence related settings.
Configuring Persistence Stores
You can configure persistence stores by running AppFabric configuration wizard by running a configuration wizard either immediately after successfully running the setup wizard, or by executing the configuration wizard from the Start menu after initial installation. The following procedure provides steps to configure instance stores using the configuration wizard.
|Many of the steps that are performed in the configuration wizard can be performed manually by executing an Application Server Extensions configuration cmdlet. See|
Open the Windows Server AppFabric Configuration Wizard by clicking Start, clicking All Programs, clicking Windows Server AppFabric, and then clicking Configure AppFabric.
On the Before You Begin page, click Next.
On the Customer Experience Improvement Program page, click Next.
On the Configure Hosting Services page, use the table below to configure persistence stores, and then click Next.
Set persistence configuration
Select to select the Workflow Management service account, and to select and configure the persistence provider.
AppFabric Workflow Management service account
Displays the Windows logon account for the Workflow Management service. The default is NT Authority\Local Service. You cannot enter the service account in this text box, but must do so in the Select User dialog box that you access by clicking Browse.
Note The security identifier (SID) of the Workflow Management service is a member of the Administrators group, and, therefore, the WMS has administrative access to the persistence database.
If you click the Browse button for the Workflow Management service account, you will be able to select the user credential for system services. You can select a built-in account or enter a custom user name and password. In the Select User dialog box, select the account that you want to use for the service, and then click OK.
Select the provider that will give access to the persistence store. All valid data providers registered on the local machine.config file will be displayed in this list.
Important In this release, the only persistence data provider that you can select is sqlStoreProvider.
Click to set the configuration for the persistence provider.
How to install additional Persistence providers
You can add a persistence provider to the list of providers that you can select in the Persistence provider drop-down box. Click this link to get help on how to add a provider.
If you clicked Configure for the SQL persistence provider (sqlStoreProvider) in the Configure Hosting Services page, the Windows Server AppFabric Persistence Store Configuration dialog box will be displayed. The following table describes the controls in this dialog box. Use this table to configure the persistence provider, and then click OK to return to the Configure Hosting Services page. Verify that the store was initialized and registered successfully.
Register persistence store registration in root web.config
Check to register the persistence store identified by the connection string, by adding or updating its configuration to the root Web.config file. This includes the ApplicationServerWorkflowInstanceStoreConnectionString and its related SQL Store Instance entry.
You can check this check box even if Initialize persistence store is not checked. Do so if the database is already created and initialized, or to point to the database even if it is not initialized.
Note This checkbox is disabled if the Hosting Administration tools are installed, but the Hosting Services feature is not installed.
Initialize persistence store
Check to initialize the persistence database identified in the connection string, as required before it can be used. Initialization creates the database schema and the structure based upon that schema. If the database does not exist, it will be created, and then initialized.
If this check box is checked, but Register persistence store registration to root web.config is not checked, then the database will be created, if necessary, and initialized, but it will not be available for use from this computer.
Note For the database to be created, you must have permissions to create databases on the destination server.
String specifying the server and database used to save persistence events.
In the Server field, enter the name of the computer that the database is on.
In the Database field, enter the name of the database to be created for persistence data, or select an existing database from the list.
Note For this release, you can only select the connection string for the SQL persistence provider. Its name by default is ApplicationServerWorkflowInstanceStoreConnectionString and cannot be changed. The connection string name is registered in the root Web.config file. You can change the server and database in this dialog box.
Select Windows authentication or SQL Server authentication. Windows Integrated Security is selected by default and the groups are populated with the default built-in groups.
For Windows authentication, to change the administrators, readers, or users, click Browse and use the standard Select User or Group dialog box to enter a different value. You can change the value for administrators, observers, or writers only if Initialize persistence store is selected.
After you have clicked OK in the Configure SQL Persistence Store dialog box, you will receive a popup indicating that you need to verify that the Workflow Management service identity is a member of the Persistence Database Administrators role. For more information, see the Securing Hosting and Persistence topic.
After setting the persistence configuration, click Next on the Configure Hosting Services page to display the Configure Caching Service page, and proceed to the “Configure Caching Service” section of this topic.
On the Configure Caching Service page, click Next.
On the Configure AppFabric Cache Node page, click Next.
On the Configure Application page, clear Start Internet Information Services (IIS) Manager , and then click Finish to close the configuration wizard.
The fields in the Workflow Persistence tab correspond to the sqlWorkflowInstanceStore element and the connectionStringName attribute on the sqlWorkflowInstanceStore element. If the SQL Server Workflow Persistence option is checked, the sqlWorkflowInstanceStore element is added to the service <behavior> element associated with the service in the configuration file. The connectionStringName attribute on the sqlWorkflowInstanceStore element is set to the connection string that the instance store you select from the SQL Server Store drop-down list points to. If you change the setting from SQL Workflow Persistence to Custom or None, the sqlWorkflowInstanceStore element is removed from the configuration file.
In the following sample configuration, the persistence feature is enabled for the service s1 by the sqlWorkflowInstanceStore element in the behavior element associated with the service s1.
<behaviors> <serviceBehaviors> <behavior name="TutorialServiceConfiguration"> <sqlWorkflowInstanceStore connectionStringName="DefaultSqlWorkflowInstanceStoreConnectionString" hostLockRenewalPeriod="00:00:30" instanceEncodingOption="None" instanceCompletionAction="DeleteAll" instanceLockedExceptionAction="NoRetry" /> </behavior> </serviceBehaviors> </behaviors>
The instance stores that you create when you install AppFabric are defined in the root Web.config file. You can create entries for custom instance stores in configuration files as well. This tab gets the name of the connection string that the instance store you select for the SQL Server store filed points to and uses that connection string in the sqlWorkflowInstanceStore element that it adds.
<microsoft.applicationServer> <persistence> <instanceStores> <add name="defaultSqlPersistenceStore" provider="SqlPersistenceStoreProvider" connectionStringName="DefaultSqlWorkflowInstanceStoreConnectionString" /> </instanceStores> </persistence> </microsoft.applicationServer>