UnloadOnIdle no longer works in Web.Config.

How has this parameter changed?
[31 byte] By [JoeMorin] at [2007-12-18]
# 1

Joe,

This parameter can be configured through persistenceservice. You can set it in config file or through code in the workflow host

C# Code Sample

WorkflowRuntime container = new WorkflowRuntime();
string connectionString = "Initial Catalog=WorkflowStore;Data Source=localhost;Integrated Security=SSPI;";
NameValueCollection persistenceParams = new NameValueCollection();
persistenceParams.Add(
"UnloadOnIdle", Convert.ToString(arguments.unloadOnIdle));
persistenceParams.Add(
"ConnectionString", connectionString);
SqlWorkflowPersistenceService sqlPersistenceSvc = new SqlWorkflowPersistenceService(persistenceParams);
container.AddService(sqlPersistenceSvc);

Config file Sampe:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="HostingWorkflowRuntime" type="System.Workflow.Runtime.Configuration.WorkflowRuntimeSection, System.Workflow.Runtime, Version=3.0.00000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</configSections>
<HostingWorkflowRuntime Name="Hosting">
<CommonParameters/>
<Services>
<add type="System.Workflow.Runtime.Hosting.DefaultWorkflowSchedulerService, System.Workflow.Runtime, Version=3.0.00000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" maxSimultaneousWorkflows="1"/>
<add type="System.Workflow.Runtime.Tracking.SqlTrackingService, System.Workflow.Runtime, Version=3.0.00000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionString="Initial Catalog=WorkflowTrackingStore;Data Source=localhost;Integrated Security=SSPI;"/>
<add type="System.Workflow.Runtime.Hosting.SqlWorkflowPersistenceService, System.Workflow.Runtime, Version=3.0.00000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionString="Initial Catalog=WorkflowPersistenceStore;Data Source=localhost;Integrated Security=SSPI;"
UnloadOnIdle="true"
LoadIntervalSeconds="5"/>
</Services>
</HostingWorkflowRuntime>
</configuration>

Hope this helps,
Sonali

SonaliC at 2007-9-8 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 2
Perfect....Side note, where did you find the answer?
JoeMorin at 2007-9-8 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...

Software Development for Windows Vista

Site Classified