<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Jimmy Rasmussens Blog : WF</title><link>http://blogs.msdn.com/jimmytr/archive/tags/WF/default.aspx</link><description>Tags: WF</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>WF in IIS Hosted WCF Service</title><link>http://blogs.msdn.com/jimmytr/archive/2007/03/19/wf-in-iis-hosted-wcf-service.aspx</link><pubDate>Mon, 19 Mar 2007 12:38:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1911977</guid><dc:creator>jimmytr</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/jimmytr/comments/1911977.aspx</comments><wfw:commentRss>http://blogs.msdn.com/jimmytr/commentrss.aspx?PostID=1911977</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Hosting Workflow in WCF is described in the before mentioned &lt;/FONT&gt;&lt;A href="http://msdn2.microsoft.com/en-us/library/bb266709.aspx"&gt;&lt;FONT face=Calibri size=3&gt;article&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt; by Jeremy Boyd. In the article it is shown how to create an extension class for Workflow, and add this to the ServiceHost Extension collection. The code presented in the article is something like:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt;using&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt; (&lt;SPAN style="COLOR: #2b91af"&gt;ServiceHost&lt;/SPAN&gt; serviceHost = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: #2b91af"&gt;ServiceHost&lt;/SPAN&gt;(&lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; ExpenseService())) &lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt;{ &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;WfWcfExtension&lt;/SPAN&gt; wfWcfExtension = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: #2b91af"&gt;WfWcfExtension&lt;/SPAN&gt;(&lt;SPAN style="COLOR: #a31515"&gt;"WorkflowRuntimeConfig"&lt;/SPAN&gt;); &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;serviceHost.Extensions.Add(wfWcfExtension); &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;serviceHost.Open(); &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;// block the process at this point, for example &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;Console&lt;/SPAN&gt;.ReadLine(); &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;serviceHost.Close(); &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN style="mso-no-proof: yes"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;While this works perfectly for a console server you may need to host the service in IIS at a later point in your development. As the example above show we need to add the extension to the ServiceHost at some point. The suggested way of doing this is to subclass the ServiceHost and add your service extensions in the OnOpening method. Example: &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt;public&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt; &lt;SPAN style="COLOR: blue"&gt;class&lt;/SPAN&gt; &lt;SPAN style="COLOR: #2b91af"&gt;WFServiceHost&lt;/SPAN&gt; : &lt;SPAN style="COLOR: #2b91af"&gt;ServiceHost&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;public&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt; WFServiceHost(&lt;SPAN style="COLOR: #2b91af"&gt;Type&lt;/SPAN&gt; t, &lt;SPAN style="COLOR: blue"&gt;params&lt;/SPAN&gt; &lt;SPAN style="COLOR: #2b91af"&gt;Uri&lt;/SPAN&gt;[] baseAddresses) : &lt;SPAN style="COLOR: blue"&gt;base&lt;/SPAN&gt;(t, baseAddresses){}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;public&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt; WFServiceHost(&lt;SPAN style="COLOR: blue"&gt;object&lt;/SPAN&gt; singletonInstance, &lt;SPAN style="COLOR: blue"&gt;params&lt;/SPAN&gt; &lt;SPAN style="COLOR: #2b91af"&gt;Uri&lt;/SPAN&gt;[] baseAddresses) : &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;base&lt;/SPAN&gt;(singletonInstance, baseAddresses) {}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;public&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt; WFServiceHost() : &lt;SPAN style="COLOR: blue"&gt;base&lt;/SPAN&gt;(){}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;protected&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt; &lt;SPAN style="COLOR: blue"&gt;override&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; OnOpening()&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;WfWcfExtension&lt;/SPAN&gt; wfWcfExtension = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: #2b91af"&gt;WfWcfExtension&lt;/SPAN&gt;(&lt;SPAN style="COLOR: #a31515"&gt;"WorkflowRuntimeConfig"&lt;/SPAN&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;Extensions.Add(wfWcfExtension);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;base&lt;/SPAN&gt;.OnOpening();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN style="mso-no-proof: yes"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;IIS hosting of WCF Services is done adding a .svc file to your and in order to use your specialized servicehost you must provide a ServiceHostFactory that creates and instance of your servicehost:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt;public&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt; &lt;SPAN style="COLOR: blue"&gt;class&lt;/SPAN&gt; &lt;SPAN style="COLOR: #2b91af"&gt;WFServiceHostFactory&lt;/SPAN&gt; : &lt;SPAN style="COLOR: #2b91af"&gt;ServiceHostFactory&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;protected&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;override&lt;/SPAN&gt; &lt;SPAN style="COLOR: #2b91af"&gt;ServiceHost&lt;/SPAN&gt; CreateServiceHost(&lt;SPAN style="COLOR: #2b91af"&gt;Type&lt;/SPAN&gt; serviceType, &lt;SPAN style="COLOR: #2b91af"&gt;Uri&lt;/SPAN&gt;[] baseAddresses)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: #2b91af"&gt;WFServiceHost&lt;/SPAN&gt;(serviceType, baseAddresses);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;The .svc file should specify this as:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes; mso-bidi-font-size: 15.0pt"&gt;&amp;lt;%@ServiceHost language="c#" &lt;B style="mso-bidi-font-weight: normal"&gt;Factory&lt;/B&gt;="WorkflowServiceHost.WFServiceHostFactory" Service="SHP.ProvisioningService" %&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1911977" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/jimmytr/archive/tags/WCF/default.aspx">WCF</category><category domain="http://blogs.msdn.com/jimmytr/archive/tags/WF/default.aspx">WF</category></item></channel></rss>