Config Based INavigationService

Topics: Web Client Software Factory, Project Management Forum, UIP Application Block discussion, User Forum
Aug 15, 2007 at 10:51 PM
I'm looking at replacing the CookiePageFlowCorrelationTokenProvider with one that's based off of an ID from the querystring. But to preserve the PageFlow between page states we'd need to pass the ID generated (a GUID) to the next page as part of the querystring.

To do that, you have to generate a class that implements INavigationService, but then you have to somehow get the WorkflowFoundationPageFlowFactory to load it. Currently WorkflowFoundationPageFlowFactory appears to generate a NavigationService from a hard coded value (as part of it's constructor). Is there a way to specifiy the NavigationService via the web.config file so that I don't have to recompile the WorkflowFoundationPageFlowFactory every time I want to update the wcsf?

Aug 15, 2007 at 11:40 PM
Some time ago I arrived at the conclusion that it is hard coded. In that ocassion I was looking at the same approach you are implementing, and went trough all the source code and I am pretty sure it is hard coded.

Freddy Rios
Aug 16, 2007 at 5:21 PM
Should this maybe become an issue? If so what are the chances this will get fixed?

Aug 17, 2007 at 7:44 PM
Hi Cameron!

Maybe, you can modify the NavigationService class in the PageFlow project of the PageFlow Application Block solution.
Compile your solution and copy to %WCSF INSTALL DIR%\Microsoft Practices Library the following dll files that were generated:



Now, if you add a PageFlow project in your WCSF solution, you will use your custom NavigationService.

Hope it helps!

Sebastian Iacomuzzi
Feb 17, 2008 at 12:30 AM
Edited Apr 10, 2008 at 3:24 PM
Modifying the libary classes to use a custom navigationservice really isn't an optimal solution. As such, I've modified the WCSF library to allow customization of the INavigationService type at the web.config level, as:

<pageFlowProvider providerType="Microsoft.Practices.PageFlow.WorkflowFoundation.WorkflowFoundationPageFlowProvider, Microsoft.Practices.PageFlow.WorkflowFoundation" navigationType="YourINavigationServiceTypeHere" />

Issue is here:
Patch is here:

More details, and feedback on my blog entry at