Controlling authentication with the WF 3.5 SendActivity

Someone emailed me a question about whether or not you can specify credentials when using the OOB SendActivity in WF 3.5 because they heard that you had to write a custom activity to accomplish this.  You do not have to write a custom activity.  While it is true that the SendActivity links to a named endpoint, and if you use the configuration file to configure your endpoint you can't specify specific credentials (a username and password for example),  WF 3.5 has a OOB WorkflowRuntime Service named the ChannelManagerService.  The ChannelManagerService (which I described in my article on MSDN - here http://msdn.microsoft.com/en-us/library/cc626077.aspx)  allows you to pre-populate some or all of the endpoints you want the SendActivities running inside of your WorkflowRuntime to use.  So you definitely can programmatically configure an Endpoint that the SendActivity can use without having to write a custom activity.


Posted Nov 16 2008, 06:23 AM by jon-flanders

Comments

links for 2008-11-16 « MyNotePad wrote links for 2008-11-16 « MyNotePad
on 11-16-2008 9:06 PM

Pingback from  links for 2008-11-16 « MyNotePad

Jim wrote re: Controlling authentication with the WF 3.5 SendActivity
on 11-17-2008 7:24 AM

Is the ChannelManagerService available when the WF is hosted in SharePoint?  IIRC, SharePoint locks down all of the WF runtime services for its own purposes and does not provide any extensibility mechanisms for developers.  Hence the source of the questions that you have been receiving.

jon-flanders wrote re: Controlling authentication with the WF 3.5 SendActivity
on 11-17-2008 1:42 PM

You can add the ChannelManagerService in sharepoint by using the ExternalDataExchangeService (this is a general workaround for non-well-known services).  In a custom activity,  you ask for the ExternalDataExchangeService, and then call AddService on it.  If the service isn't one that implements an EDS interface - EDS still adds it to the WorkflowRuntime

Add a Comment

(required)  
(optional)
(required)  
Remember Me?