<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>stdeepdive</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/stdeepdive/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/stdeepdive/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 17 Apr 2019 03:51:47 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Hosting WCF/Workflow Service in IIS directly from Visual Studio 2010 and start debugging by just hitting F5 on Visual Studio.</title>
      <link>https://docs.microsoft.com/archive/blogs/stdeepdive/hosting-wcfworkflow-service-in-iis-directly-from-visual-studio-2010-and-start-debugging-by-just-hitting-f5-on-visual-studio</link>
      <pubDate>Tue, 08 May 2012 09:39:00 GMT</pubDate>
      <dc:creator><![CDATA[ArunMalik]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/stdeepdive/2012/05/08/hosting-wcfworkflow-service-in-iis-directly-from-visual-studio-2010-and-start-debugging-by-just-hitting-f5-on-visual-studio/</guid>
      <description><![CDATA[&#160;  Problem:  When you develop a WCF/Workflow service using Visual Studio and try to run it, by...]]></description>
      <content:encoded><![CDATA[<p>&#160;</p>  <p><font size="3"><font color="#000000"><font face="Calibri"><b><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;">Problem:</span></b></font></font></font></p>  <p style="margin-bottom: 0pt;"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font size="3"><font color="#000000"><font face="Calibri">When you develop a WCF/Workflow service using Visual Studio and try to run it, by default Visual Studio runs it under web development server. Here the problem is that the web development server is a light weight host and does not support reach features which comes with IIS. For example web development server does not allow you to run a WCF/Workflow service, which is configured to use NET TCP binding. There are many more such features which do not come with web development server. </font></font></font></span></p>  <p style="margin-bottom: 0pt;"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font size="3"><font color="#000000"><font face="Calibri">As a developer we all want to, just hit the F5 button and start debugging. But if your WCF/Workflow service is configured in such a way that it can only run under IIS, it becomes really tricky to start debugging it.</font></font></font></span></p>  <p style="margin-bottom: 0pt;"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font size="3"><font color="#000000"><font face="Calibri">The common approach we generally follow is to out in which w3wp.exe our service is running and then attach the Visual Studio to that process. </font></font></font></span></p>  <p style="margin-bottom: 0pt;"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font size="3"><font color="#000000"><font face="Calibri">In following text, I have shown another approach in which Visual Studio can be configured to run together with IIS. With this configuration your WCF/Workflow Services runs under IIS as soon you hit the F5 and you can start debugging without any hassles.</font></font></font></span></p>  <p style="margin-bottom: 0pt;"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font color="#000000" size="3" face="Calibri"></font></span></p>  <p style="margin: 0cm 0cm 0pt 27pt; text-indent: -18pt; vertical-align: middle; mso-list: l4 level1 lfo1; tab-stops: list 36.0pt;" class="MsoNormal"><font color="#000000"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><span style="mso-list: ignore;"><font size="3" face="Calibri">1.</font><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font size="3"><font face="Calibri">Create WCF/Workflow server. See how to create basic Workflow WCF Server.</font></font></span></font></p>  <p style="margin: 0cm 0cm 0pt 27pt; text-indent: -18pt; vertical-align: middle; mso-list: l2 level1 lfo2; tab-stops: list 36.0pt;" class="MsoNormal"><font color="#000000"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><span style="mso-list: ignore;"><font size="3" face="Calibri">2.</font><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font size="3"><font face="Calibri">Configure IIS to host your WCF/Workflow service.</font></font></span></font></p>  <p style="margin: 0cm 0cm 0pt 27pt; text-indent: -18pt; vertical-align: middle; mso-list: l2 level1 lfo2; tab-stops: list 36.0pt;" class="MsoNormal"><font color="#000000" size="3" face="Calibri"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"></span></font></p>  <p style="margin: 0cm 0cm 0pt 27pt;"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font size="3"><font color="#000000"><font face="Calibri">(Note: -You can skip following steps if you already have some IIS website configured on port 80 and NET </font></font></font></span></p>  <p style="margin: 0cm 0cm 0pt 27pt;"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font size="3"><font color="#000000"><font face="Calibri">TCP binding is configured. )</font></font></font></span></p>  <p style="margin: 0cm 0cm 0pt 27pt;"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font color="#000000" size="3" face="Calibri"></font></span></p>  <p style="margin: 0cm 0cm 0pt 54pt; text-indent: -18pt; vertical-align: middle; mso-list: l5 level1 lfo3; tab-stops: list 36.0pt;" class="MsoNormal"><font color="#000000"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><span style="mso-list: ignore;"><font size="3" face="Calibri">a.</font><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font size="3"><font face="Calibri">Open IIS Manager.</font></font></span></font></p>  <p style="margin: 0cm 0cm 0pt 54pt; text-indent: -18pt; vertical-align: middle; mso-list: l5 level1 lfo3; tab-stops: list 36.0pt;" class="MsoNormal"><font color="#000000"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><span style="mso-list: ignore;"><font size="3" face="Calibri">b.</font><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160; </span></span></span><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font size="3"><font face="Calibri">Add new application pool.</font></font></span></font></p>  <p style="margin: 0cm 0cm 0pt 81pt; text-indent: -81pt; vertical-align: middle; mso-list: l5 level2 lfo4; tab-stops: list 72.0pt; mso-text-indent-alt: -18.0pt;" class="MsoNormal"><font color="#000000"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><span style="mso-list: ignore;"><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><font size="3" face="Calibri">i.</font><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160; </span></span></span><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font size="3"><font face="Calibri">Select 'Application Pools' node from the left hand side tree view.</font></font></span></font></p>  <p style="margin: 0cm 0cm 0pt 81pt; text-indent: -81pt; vertical-align: middle; mso-list: l5 level2 lfo5; tab-stops: list 72.0pt; mso-text-indent-alt: -18.0pt;" class="MsoNormal"><font color="#000000"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><span style="mso-list: ignore;"><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><font size="3" face="Calibri">ii.</font><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160; </span></span></span><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font size="3"><font face="Calibri">Click on 'Add Application Pool' link from 'Actions' panel at right hand side.</font></font></span></font></p>  <p style="margin: 0cm 0cm 0pt 81pt; text-indent: -81pt; vertical-align: middle; mso-list: l5 level2 lfo5; tab-stops: list 72.0pt; mso-text-indent-alt: -18.0pt;" class="MsoNormal"><font color="#000000"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><span style="mso-list: ignore;"><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><font size="3" face="Calibri">iii.</font><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160; </span></span></span><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font size="3"><font face="Calibri">Give some name to your application pool. I have given name as 'WorkflowService'. In below steps I will refer your application pool as 'WorkflowService'.</font></font></span></font></p>  <p style="margin: 0cm 0cm 0pt 81pt; text-indent: -81pt; vertical-align: middle; mso-list: l5 level2 lfo5; tab-stops: list 72.0pt; mso-text-indent-alt: -18.0pt;" class="MsoNormal"><font color="#000000"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><span style="mso-list: ignore;"><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><font size="3" face="Calibri">iv.</font><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160; </span></span></span><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font size="3"><font face="Calibri">Change .Net Framework Version to 4.0</font></font></span></font></p>  <p style="margin: 0cm 0cm 0pt 81pt; text-indent: -81pt; vertical-align: middle; mso-list: l5 level2 lfo5; tab-stops: list 72.0pt; mso-text-indent-alt: -18.0pt;" class="MsoNormal"><font color="#000000"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><span style="mso-list: ignore;"><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><font size="3" face="Calibri">v.</font><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160; </span></span></span><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font size="3"><font face="Calibri">Click 'Ok'</font></font></span></font></p>  <p><font color="#000000" size="3" face="Times New Roman"></font></p>  <p style="margin: 0cm 0cm 0pt 81pt;"><font size="3"><font color="#000000"><font face="Times New Roman"><span style="mso-no-proof: yes;"><img alt="Description: Machine generated alternative text: Edit Application Pool I ‘ ________&#10;WorkflowService&#10;.NET framework version:&#10;Framework v4.0 30319&#10;Managed pipelin&#10;e mode:&#10;Integrated&#10;w&#10;j start application pool immediately&#10;[ 0K ] [ Cancel j" src="file:///C:/Users/armalik/AppData/Local/Temp/msohtmlclip1/01/clip_image002.jpg" width="316" height="285" /></span><span style="font-family: &quot;Times New Roman&quot;,&quot;serif&quot;; font-size: 12pt;">                    </span></font></font></font></p>  <p><font color="#000000" size="3" face="Times New Roman"></font></p>  <p style="margin: 0cm 0cm 0pt 54pt; text-indent: -18pt; vertical-align: middle; mso-list: l6 level1 lfo6; tab-stops: list 36.0pt;" class="MsoNormal"><font color="#000000"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><span style="mso-list: ignore;"><font size="3" face="Calibri">c.</font><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font size="3"><font face="Calibri">Add new 'Web Site Application' for your services.</font></font></span></font></p>  <p style="margin: 0cm 0cm 0pt 81pt; text-indent: -81pt; vertical-align: middle; mso-list: l6 level2 lfo7; tab-stops: list 72.0pt; mso-text-indent-alt: -18.0pt;" class="MsoNormal"><font color="#000000"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><span style="mso-list: ignore;"><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><font size="3" face="Calibri">i.</font><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160; </span></span></span><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font size="3"><font face="Calibri">Select 'Sites' node from the left hand side tree view.</font></font></span></font></p>  <p style="margin: 0cm 0cm 0pt 81pt; text-indent: -81pt; vertical-align: middle; mso-list: l6 level2 lfo7; tab-stops: list 72.0pt; mso-text-indent-alt: -18.0pt;" class="MsoNormal"><font color="#000000"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><span style="mso-list: ignore;"><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><font size="3" face="Calibri">ii.</font><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160; </span></span></span><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font size="3"><font face="Calibri">Right click on 'Sites' node and click 'Add Web Site'</font></font></span></font></p>  <p style="margin: 0cm 0cm 0pt 81pt; text-indent: -81pt; vertical-align: middle; mso-list: l6 level2 lfo7; tab-stops: list 72.0pt; mso-text-indent-alt: -18.0pt;" class="MsoNormal"><font color="#000000"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><span style="mso-list: ignore;"><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><font size="3" face="Calibri">iii.</font><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160; </span></span></span><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font size="3"><font face="Calibri">Give Some name to your Web Site. I have given name as 'WorkflowService'. I have given name as 'WorkflowService'. In below steps I will refer your website as 'WorkflowService'.</font></font></span></font></p>  <p style="margin: 0cm 0cm 0pt 81pt; text-indent: -81pt; vertical-align: middle; mso-list: l6 level2 lfo7; tab-stops: list 72.0pt; mso-text-indent-alt: -18.0pt;" class="MsoNormal"><font color="#000000"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><span style="mso-list: ignore;"><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><font size="3" face="Calibri">iv.</font><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160; </span></span></span><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font size="3"><font face="Calibri">Change Application Pool name to 'WorkflowService'.</font></font></span></font></p>  <p style="margin: 0cm 0cm 0pt 81pt; text-indent: -81pt; vertical-align: middle; mso-list: l6 level2 lfo7; tab-stops: list 72.0pt; mso-text-indent-alt: -18.0pt;" class="MsoNormal"><font color="#000000"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><span style="mso-list: ignore;"><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><font size="3" face="Calibri">v.</font><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160; </span></span></span><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font size="3"><font face="Calibri">Provide some directory path to create IIS virtual directory for this new web site.</font></font></span></font></p>  <p style="margin: 0cm 0cm 0pt 81pt; text-indent: -81pt; vertical-align: middle; mso-list: l6 level2 lfo7; tab-stops: list 72.0pt; mso-text-indent-alt: -18.0pt;" class="MsoNormal"><font color="#000000"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><span style="mso-list: ignore;"><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><font size="3" face="Calibri">vi.</font><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160; </span></span></span><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font size="3"><font face="Calibri">Provide host name as 'localhost' </font></font></span></font></p>  <p style="margin: 0cm 0cm 0pt 81pt; text-indent: -81pt; vertical-align: middle; mso-list: l6 level2 lfo7; tab-stops: list 72.0pt; mso-text-indent-alt: -18.0pt;" class="MsoNormal"><font color="#000000"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><span style="mso-list: ignore;"><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><font size="3" face="Calibri">vii.</font><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160; </span></span></span><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font size="3"><font face="Calibri">Click 'Ok'</font></font></span></font></p>  <p style="margin: 0cm 0cm 0pt 81pt; text-indent: -81pt; vertical-align: middle; mso-list: l6 level2 lfo7; tab-stops: list 72.0pt; mso-text-indent-alt: -18.0pt;" class="MsoNormal"><font color="#000000" size="3" face="Calibri"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"></span></font></p>  <p style="margin: 0cm 0cm 0pt 81pt;"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font face="Calibri"><font size="3"><font color="#000000"><span style="mso-spacerun: yes;">&#160;</span>(Note : While clicking on Ok button you might get a message saying that some other website is already configured to run on port number 80. You just need to close that website and start your newly created website.)</font></font></font></span><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font size="3"><font color="#000000"><font face="Calibri">&#160;          </font></font></font></span></p>  <p><font color="#000000" size="3" face="Times New Roman"></font></p>  <p style="margin: 0cm 0cm 0pt 81pt;"><font size="3"><font color="#000000"><font face="Times New Roman"><span style="mso-no-proof: yes;"><img alt="Description: Machine generated alternative text: Add Web Site&#10;site name: Application pool: ________________&#10;WorkflowService WorkflowService [ Select... j&#10;Content Directory&#10;hysicaI path:&#10;Pass-through authentication&#10;[connect as... ] [Test Settings... j&#10;Binding&#10;]ype: IP address: Port:&#10;[hap vj All Unassigned 80&#10;Host name:&#10;localhost&#10;Example: www.contoso.com or marketing.contoso.com&#10;Start Web site immediately&#10;[ 0K j [ Cancel j" src="file:///C:/Users/armalik/AppData/Local/Temp/msohtmlclip1/01/clip_image004.jpg" width="395" height="384" /></span><span style="font-family: &quot;Times New Roman&quot;,&quot;serif&quot;; font-size: 12pt;">                    </span></font></font></font></p>  <p><font color="#000000" size="3" face="Times New Roman"></font></p>  <p style="margin: 0cm 0cm 0pt 81pt;"><font color="#000000" size="3" face="Times New Roman"></font></p>  <p style="margin: 0cm 0cm 0pt 54pt; text-indent: -18pt; vertical-align: middle; mso-list: l3 level1 lfo8; tab-stops: list 36.0pt;" class="MsoNormal"><font color="#000000"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><span style="mso-list: ignore;"><font size="3" face="Calibri">d.</font><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160; </span></span></span><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font size="3"><font face="Calibri">Configure NET TCP Binding</font></font></span></font></p>  <p style="margin: 0cm 0cm 0pt 81pt; text-indent: -81pt; vertical-align: middle; mso-list: l3 level2 lfo9; tab-stops: list 72.0pt; mso-text-indent-alt: -18.0pt;" class="MsoNormal"><font color="#000000"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><span style="mso-list: ignore;"><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><font size="3" face="Calibri">i.</font><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160; </span></span></span><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font size="3"><font face="Calibri">Right click on 'WorkflowService ' web site and click on 'Edit Bindings' to open 'Site Bindings' dialog.</font></font></span></font></p>  <p style="margin: 0cm 0cm 0pt 81pt; text-indent: -81pt; vertical-align: middle; mso-list: l3 level2 lfo9; tab-stops: list 72.0pt; mso-text-indent-alt: -18.0pt;" class="MsoNormal"><font color="#000000"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><span style="mso-list: ignore;"><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><font size="3" face="Calibri">ii.</font><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160; </span></span></span><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font face="Calibri"><font size="3">Click on 'Add' button to open<span style="mso-spacerun: yes;">&#160; </span>'Add Site Binding' dialog.</font></font></span></font></p>  <p style="margin: 0cm 0cm 0pt 81pt; text-indent: -81pt; vertical-align: middle; mso-list: l3 level2 lfo9; tab-stops: list 72.0pt; mso-text-indent-alt: -18.0pt;" class="MsoNormal"><font color="#000000"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><span style="mso-list: ignore;"><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><font size="3" face="Calibri">iii.</font><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160; </span></span></span><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font size="3"><font face="Calibri">From 'Type' dropdown select 'net.tcp'.</font></font></span></font></p>  <p style="margin: 0cm 0cm 0pt 81pt; text-indent: -81pt; vertical-align: middle; mso-list: l3 level2 lfo9; tab-stops: list 72.0pt; mso-text-indent-alt: -18.0pt;" class="MsoNormal"><font color="#000000"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><span style="mso-list: ignore;"><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><font size="3" face="Calibri">iv.</font><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160; </span></span></span><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font size="3"><font face="Calibri">Type 808:* in Binding Information text box.</font></font></span></font></p>  <p style="margin: 0cm 0cm 0pt 81pt; text-indent: -81pt; vertical-align: middle; mso-list: l3 level2 lfo9; tab-stops: list 72.0pt; mso-text-indent-alt: -18.0pt;" class="MsoNormal"><font color="#000000"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><span style="mso-list: ignore;"><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><font size="3" face="Calibri">v.</font><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160; </span></span></span><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font size="3"><font face="Calibri">Click Ok.</font></font></span></font></p>  <p><font color="#000000" size="3" face="Times New Roman"></font></p>  <p style="margin: 0cm 0cm 0pt 81pt;"><font size="3"><font color="#000000"><font face="Times New Roman"><span style="mso-no-proof: yes;"><img alt="Description: Machine generated alternative text: Add Site Binding I &#10;lype:&#10;net.tcp H&#10;ßinding information:&#10;808:1&#10;j OK ] [ Cancel j" src="file:///C:/Users/armalik/AppData/Local/Temp/msohtmlclip1/01/clip_image006.jpg" width="482" height="263" /></span><span style="font-family: &quot;Times New Roman&quot;,&quot;serif&quot;; font-size: 12pt;">                    </span></font></font></font></p>  <p><font color="#000000" size="3" face="Times New Roman"></font></p>  <p style="margin: 0cm 0cm 0pt 81pt;"><font size="3"><font color="#000000"><font face="Times New Roman"><span style="mso-no-proof: yes;"><img alt="Description: Machine generated alternative text: Site Bindings&#10;Type Host Name Port IP Address Binding Infor [ Add... j&#10;http localhost 80 * .&#10;net.tcp 808:*&#10;I _________________________________________________ ______________________________&#10;Close" src="file:///C:/Users/armalik/AppData/Local/Temp/msohtmlclip1/01/clip_image008.jpg" width="482" height="225" /></span><span style="font-family: &quot;Times New Roman&quot;,&quot;serif&quot;; font-size: 12pt;">                    </span></font></font></font></p>  <p><font color="#000000" size="3" face="Times New Roman"></font></p>  <p style="margin: 0cm 0cm 0pt 54pt;"><font color="#000000" size="3" face="Times New Roman"></font></p>  <p style="margin: 0cm 0cm 0pt 54pt; text-indent: -18pt; vertical-align: middle; mso-list: l0 level1 lfo10; tab-stops: list 36.0pt;" class="MsoNormal"><font color="#000000"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><span style="mso-list: ignore;"><font size="3" face="Calibri">e.</font><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160; </span></span></span><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font size="3"><font face="Calibri">Enable NET TCP Binding on Web Site.</font></font></span></font></p>  <p style="margin: 0cm 0cm 0pt 81pt; text-indent: -81pt; vertical-align: middle; mso-list: l0 level2 lfo11; tab-stops: list 72.0pt; mso-text-indent-alt: -18.0pt;" class="MsoNormal"><font color="#000000"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><span style="mso-list: ignore;"><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><font size="3" face="Calibri">i.</font><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160; </span></span></span><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font size="3"><font face="Calibri">Select 'WorkflowService' website node from left hand side tree view.</font></font></span></font></p>  <p style="margin: 0cm 0cm 0pt 81pt; text-indent: -81pt; vertical-align: middle; mso-list: l0 level2 lfo11; tab-stops: list 72.0pt; mso-text-indent-alt: -18.0pt;" class="MsoNormal"><font color="#000000"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><span style="mso-list: ignore;"><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><font size="3" face="Calibri">ii.</font><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160; </span></span></span><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font size="3"><font face="Calibri">Click on 'Advanced Settings' from 'Actions' panel at right hand side.</font></font></span></font></p>  <p style="margin: 0cm 0cm 0pt 81pt; text-indent: -81pt; vertical-align: middle; mso-list: l0 level2 lfo11; tab-stops: list 72.0pt; mso-text-indent-alt: -18.0pt;" class="MsoNormal"><font color="#000000"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><span style="mso-list: ignore;"><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><font size="3" face="Calibri">iii.</font><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160; </span></span></span><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font size="3"><font face="Calibri">Update 'Enabled Protocols' field by adding comma delimited value as 'net.tcp' at the end of the existing value.</font></font></span></font></p>  <p style="margin: 0cm 0cm 0pt 81pt; text-indent: -81pt; vertical-align: middle; mso-list: l0 level2 lfo11; tab-stops: list 72.0pt; mso-text-indent-alt: -18.0pt;" class="MsoNormal"><font color="#000000"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><span style="mso-list: ignore;"><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><font size="3" face="Calibri">iv.</font><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160; </span></span></span><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font size="3"><font face="Calibri">Click 'Ok'</font></font></span></font></p>  <p><font color="#000000" size="3" face="Times New Roman"></font></p>  <p style="margin: 0cm 0cm 0pt 81pt;"><font size="3"><font color="#000000"><font face="Times New Roman"><span style="mso-no-proof: yes;"><img alt="Description: Machine generated alternative text: Advanced Settings [ ‘ _______&#10;El (General)&#10;Application Pool Workflow5ervke&#10;Bindings httpr:8U:iocaihost,net.tcp:8Ur&#10;ID 3&#10;I Name WorkflowService&#10;Physical Path D:\[earning\My Blog\Workflow hoste&#10;Physical Path Credentials&#10;Physical Path Credentials Logon 1 ClearText&#10;Start Automatically True&#10;Behavior&#10;Connection Limits&#10;Enabled Protocols http.net.tcp&#10;S Failed Request Tracing&#10;Name&#10;[name] A unique name for the site.&#10;OK Cancel" src="file:///C:/Users/armalik/AppData/Local/Temp/msohtmlclip1/01/clip_image010.jpg" width="314" height="384" /></span><span style="font-family: &quot;Times New Roman&quot;,&quot;serif&quot;; font-size: 12pt;">                    </span></font></font></font></p>  <p><font color="#000000" size="3" face="Times New Roman"></font></p>  <p style="margin: 0cm 0cm 0pt 81pt;"><font color="#000000" size="3" face="Times New Roman"></font></p>  <p style="margin: 0cm 0cm 0pt 27pt; text-indent: -18pt; vertical-align: middle; mso-list: l1 level1 lfo12; tab-stops: list 36.0pt;" class="MsoNormal"><font color="#000000"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><span style="mso-list: ignore;"><font size="3" face="Calibri">3.</font><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font size="3"><font face="Calibri">Configure Visual Studio Project settings to use IIS as service host instead of default web development server.</font></font></span></font></p>  <p style="margin: 0cm 0cm 0pt 54pt; text-indent: -18pt; vertical-align: middle; mso-list: l1 level2 lfo13; tab-stops: list 72.0pt;" class="MsoNormal"><font color="#000000"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><span style="mso-list: ignore;"><font size="3" face="Calibri">a.</font><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font size="3"><font face="Calibri">Select your service project in Solution Explorer and press ALT+ENTER to open project properties dialog.</font></font></span></font></p>  <p style="margin: 0cm 0cm 0pt 54pt; text-indent: -18pt; vertical-align: middle; mso-list: l1 level2 lfo14; tab-stops: list 72.0pt;" class="MsoNormal"><font color="#000000"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><span style="mso-list: ignore;"><font size="3" face="Calibri">b.</font><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160; </span></span></span><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font size="3"><font face="Calibri">Click on 'Web' tab on project properties dialog.</font></font></span></font></p>  <p style="margin: 0cm 0cm 0pt 54pt; text-indent: -18pt; vertical-align: middle; mso-list: l1 level2 lfo15; tab-stops: list 72.0pt;" class="MsoNormal"><font color="#000000"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><span style="mso-list: ignore;"><font size="3" face="Calibri">c.</font><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font size="3"><font face="Calibri">On 'Web' tab page, select 'Use local IIS Web Server' radio button.</font></font></span></font></p>  <p style="margin: 0cm 0cm 0pt 54pt; text-indent: -18pt; vertical-align: middle; mso-list: l1 level2 lfo16; tab-stops: list 72.0pt;" class="MsoNormal"><font color="#000000"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><span style="mso-list: ignore;"><font size="3" face="Calibri">d.</font><span style="font: 7pt/normal &quot;Times New Roman&quot;; font-size-adjust: none; font-stretch: normal;">&#160;&#160;&#160;&#160;&#160; </span></span></span><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font size="3"><font face="Calibri">Click on 'Create Virtual Directory' button to link your website project with IIS.</font></font></span></font></p>  <p style="margin: 0cm 0cm 0pt 54pt;"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font size="3"><font color="#000000"><font face="Calibri">(Note: This step will fail if Visual Studio is not running in Administrator privileges.)</font></font></font></span><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font size="3"><font color="#000000"><font face="Calibri">&#160;          </font></font></font></span></p>  <p><font color="#000000" size="3" face="Times New Roman"></font></p>  <p style="margin: 0cm 0cm 0pt 54pt;"><font size="3"><font color="#000000"><font face="Times New Roman"><span style="mso-no-proof: yes;"><img alt="Description: Machine generated alternative text: WorkflowService X WorkflowService.xamb&#10;Application&#10;Build ______&#10;Web&#10;Package/Publish Web&#10;Package/Publish SQL&#10;Servers&#10;Silverlight Applications&#10;Build Events&#10;Resources&#10;Settings&#10;Reference Paths&#10;Signing&#10;Code Analysis&#10;WorkflowServicePinglm p. cs&#10;Configuration: L1A _______ Platform: [N/A ________&#10;Start URL&#10;! I Dont open a page. Wait for a request from an externat application.&#10;Rl apply server settings to all users (store in project file)&#10;Use Visual Studio Qevelopment Server&#10;®  ,&#10;recific port [am&#10;Virtual path: L’&#10;E NTLM Authentication&#10;fl Enable Edit and Continue&#10;‘G’ Use Local US Web server&#10;Project Url: http:HlocalhostfWorkflowService [ Create Virtual Directorx]&#10;Override application root URL&#10;https://localhostfWorkflowService&#10;© Use Custom Web Server&#10;Server Url: L" src="file:///C:/Users/armalik/AppData/Local/Temp/msohtmlclip1/01/clip_image012.jpg" width="518" height="301" /></span><span style="font-family: &quot;Times New Roman&quot;,&quot;serif&quot;; font-size: 12pt;">                    </span></font></font></font></p>  <p><font color="#000000" size="3" face="Times New Roman"></font></p>  <p style="margin: 0cm 0cm 0pt 54pt;"><font color="#000000" size="3" face="Times New Roman"></font></p>  <p style="margin-bottom: 0pt;"><span style="mso-bidi-font-size: 11.0pt; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri;"><font size="3"><font color="#000000"><font face="Calibri">At this stage you have successfully configured IIS and Visual Studio to work together and help you debugging your WCF/Workflow services by just hitting on F5 button on Visual Studio.                     </font></font></font></span></p>  <p><font color="#000000" size="3" face="Times New Roman"></font></p>]]></content:encoded>
    </item>
    <item>
      <title>WCF Extension Points and how to use them?</title>
      <link>https://docs.microsoft.com/archive/blogs/stdeepdive/wcf-extension-points-and-how-to-use-them</link>
      <pubDate>Mon, 07 May 2012 10:44:00 GMT</pubDate>
      <dc:creator><![CDATA[ArunMalik]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/stdeepdive/2012/05/07/wcf-extension-points-and-how-to-use-them/</guid>
      <description><![CDATA[In one of the SOA based system, I had a requirement of intercepting the service method calls to...]]></description>
      <content:encoded><![CDATA[<p style="margin: 0in; font-family: calibri; font-size: 11pt;">In one of the SOA based system, I had a requirement of intercepting the service method calls to automatically log the method's entry and exit calls to implement automatic logging and exception handling without putting any logging statements or<span style="mso-spacerun: yes;">&nbsp; </span>try catch block in each service method implementation. The implementation of these features was giving us more cleaner implementation of business functionality in service methods by abstracting away the implementation of crosscutting concerns, In this case, exception handling or logging.</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">&nbsp;</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">To implement the above feature I was looking for the way to get execution control even before it goes to the service methods. Good news is that WCF itself helped me and gave the control with the help of it's extension points. Lets see what all extension points I used.</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">&nbsp;</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="font-weight: bold;">Proxy and Dispatcher</span></p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"></p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">WCF works on messages which are send between client and service. Every time client wants to call a service<span style="mso-spacerun: yes;">&nbsp; </span>method, it sends a message to service with help of Proxy running in client process. Job of the Proxy is to take the client request and convert it into a message which is than further serialized and transferred to the service end. At service end this is received by Dispatcher. Dispatcher takes the message and desterilizes the content into appropriate CLR type, finds out which has to be called on behalf of the client and calls that message.</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">&nbsp;</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">Both Proxy and Dispatcher provides many extension points using different interfaces. When you implement these interfaces in your own class and register those class with WCF framework (we will see how?), Both Proxy and Dispatcher calls the implementation in your class at the time of message processing.</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">&nbsp;</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">Lets see what all interfaces are provided via WCF framework to intercept the message processing.</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">&nbsp;</p>
<ol style="font-family: calibri; font-size: 11pt; font-style: normal; font-weight: normal; margin-top: 0in; margin-bottom: 0in; margin-left: 0.375in; unicode-bidi: embed; direction: ltr;" type="1">
<li style="color: #333333; margin-top: 0px; margin-bottom: 0px; vertical-align: middle;" value="value"><span style="background: white; color: #333333; font-family: calibri; font-size: 11pt; font-style: normal; font-weight: normal;">IParameterInspector : </span><span style="color: black; font-family: calibri; font-size: 11pt; font-style: normal; font-weight: normal;">Called before and after invocation to inspect and modify parameter values.</span></li>
</ol>
<p style="color: #333333; margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"></p>
<ol style="font-family: calibri; font-size: 11pt; font-style: normal; font-weight: normal; margin-top: 0in; margin-bottom: 0in; margin-left: 0.375in; unicode-bidi: embed; direction: ltr;" type="1">
<li style="color: #333333; margin-top: 0px; margin-bottom: 0px; vertical-align: middle;" value="value"><span style="background: white; font-family: calibri; font-size: 11pt; font-style: normal; font-weight: normal;">IDispatchMessageFormatter/IClientFormatter : Called to perform serialization and deserialization.</span></li>
</ol>
<p style="color: #333333; margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"></p>
<ol style="font-family: calibri; font-size: 11pt; font-style: normal; font-weight: normal; margin-top: 0in; margin-bottom: 0in; margin-left: 0.375in; unicode-bidi: embed; direction: ltr;" type="1">
<li style="color: #333333; margin-top: 0px; margin-bottom: 0px; vertical-align: middle;" value="value"><span style="background: white; font-family: calibri; font-size: 11pt; font-style: normal; font-weight: normal;">IDispatchMessageInspector/IClientMessageInspector : Called before send or after receive to inspect and replace message contents.</span></li>
</ol>
<p style="color: #333333; margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"></p>
<ol style="font-family: calibri; font-size: 11pt; font-style: normal; font-weight: normal; margin-top: 0in; margin-bottom: 0in; margin-left: 0.375in; unicode-bidi: embed; direction: ltr;" type="1">
<li style="color: #333333; margin-top: 0px; margin-bottom: 0px; vertical-align: middle;" value="value"><span style="background: white; font-family: calibri; font-size: 11pt; font-style: normal; font-weight: normal;">IDispatchOperationSelector/IClientOperationSelector : Called to select the operation to invoke for the given message.</span></li>
</ol>
<p style="color: #333333; margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"></p>
<ol style="font-family: calibri; font-size: 11pt; font-style: normal; font-weight: normal; margin-top: 0in; margin-bottom: 0in; margin-left: 0.375in; unicode-bidi: embed; direction: ltr;" type="1">
<li style="color: #333333; margin-top: 0px; margin-bottom: 0px; vertical-align: middle;" value="value"><span style="background: white; font-family: calibri; font-size: 11pt; font-style: normal; font-weight: normal;">IOperationInvoker : Called to invoke the operation.</span></li>
<li style="color: #333333; margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"><span style="background: white; font-family: calibri; font-size: 11pt; font-style: normal; font-weight: normal;"></span></li>
</ol>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="font-weight: bold;">Registering your inspector class with WCF runtime</span></p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"></p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">You use WCF behaviours to register your inspector classes with WCF runtime. When theServiceHost initializes the service, it looks into app.config/web.configfiles<span style="mso-spacerun: yes;">&nbsp; </span>for the behaviours to apply and also reflects over all the attributes applied on service contract methods to check if any attribute has implemented any behaviour interface. If it finds one, it creates an instance of that attribute type and calls appropriate methods of behaviour interface, implemented by attribute class, to you give you a change to register your interceptors during service initialization.<span style="mso-spacerun: yes;">&nbsp; </span>There are following types of behaviours provided supported in WCF</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">&nbsp;</p>
<ol style="font-family: calibri; font-size: 11pt; font-style: normal; font-weight: normal; margin-top: 0in; margin-bottom: 0in; margin-left: 0.375in; unicode-bidi: embed; direction: ltr;" type="1">
<li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;" value="value"><span style="font-family: calibri; font-size: 11pt; font-style: normal; font-weight: normal;">IServiceBehavior: Allows you to register your inspectors at Service level.</span></li>
</ol>
<p style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"></p>
<ol style="font-family: calibri; font-size: 11pt; font-style: normal; font-weight: normal; margin-top: 0in; margin-bottom: 0in; margin-left: 0.375in; unicode-bidi: embed; direction: ltr;" type="1">
<li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;" value="value"><span style="font-family: calibri; font-size: 11pt; font-style: normal; font-weight: normal;">IEndpointBehavior: Allows you to register your inspectors at Endpoint level.</span></li>
</ol>
<p style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"></p>
<ol style="font-family: calibri; font-size: 11pt; font-style: normal; font-weight: normal; margin-top: 0in; margin-bottom: 0in; margin-left: 0.375in; unicode-bidi: embed; direction: ltr;" type="1">
<li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;" value="value"><span style="font-family: calibri; font-size: 11pt; font-style: normal; font-weight: normal;">IContractBehavior: Allows you to register your inspectors at Service Contract level.</span></li>
</ol>
<p style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"></p>
<ol style="font-family: calibri; font-size: 11pt; font-style: normal; font-weight: normal; margin-top: 0in; margin-bottom: 0in; margin-left: 0.375in; unicode-bidi: embed; direction: ltr;" type="1">
<li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;" value="value"><span style="font-family: calibri; font-size: 11pt; font-style: normal; font-weight: normal;">IOperarionBehavior: Allows you to register your inspectors at each Operation level.</span></li>
</ol>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">All these behaviour interfaces are having same methods but the method signatures are different so that your only get those runtime objects which comes under the scope you want to extend. Following are the methods available in each behaviour interface.</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">&nbsp;</p>
<ol style="font-family: calibri; font-size: 11pt; font-style: normal; font-weight: normal; margin-top: 0in; margin-bottom: 0in; margin-left: 0.375in; unicode-bidi: embed; direction: ltr;" type="1">
<li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;" value="value"><span style="font-family: calibri; font-size: 11pt; font-style: normal; font-weight: normal;">Validate: Called just before the runtime is built&mdash;allows you to perform custom validation on the service description.</span></li>
</ol>
<p style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"></p>
<ol style="font-family: calibri; font-size: 11pt; font-style: normal; font-weight: normal; margin-top: 0in; margin-bottom: 0in; margin-left: 0.375in; unicode-bidi: embed; direction: ltr;" type="1">
<li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;" value="value"><span style="font-family: calibri; font-size: 11pt; font-style: normal; font-weight: normal;">AddBindingParameters: Called in the first step of building the runtime, before the underlying channel is constructed&mdash;allows you to add parameters to influence the underlying channel stack.</span></li>
</ol>
<p style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"></p>
<ol style="font-family: calibri; font-size: 11pt; font-style: normal; font-weight: normal; margin-top: 0in; margin-bottom: 0in; margin-left: 0.375in; unicode-bidi: embed; direction: ltr;" type="1">
<li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;" value="value"><span style="font-family: calibri; font-size: 11pt; font-style: normal; font-weight: normal;">ApplyClientBehavior: Allows behavior to inject proxy (client) inspectors. this method is not present on IServiceBehavior.</span></li>
</ol>
<p style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"></p>
<ol style="font-family: calibri; font-size: 11pt; font-style: normal; font-weight: normal; margin-top: 0in; margin-bottom: 0in; margin-left: 0.375in; unicode-bidi: embed; direction: ltr;" type="1">
<li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;" value="value"><span style="font-family: calibri; font-size: 11pt; font-style: normal; font-weight: normal;">ApplyDispatchBehavior:Allows behavior to inject dispatcher inspectors.</span>&nbsp;</li>
</ol>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">Now you know what all classes and interfaces are available from WCF to extend its runtime, lets extend the runtime to intercept the service method calls and log the entry and exit of method call automatically (without writing logging code in service method implementation).</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">&nbsp;</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">Following are the classes involved in the example code. To make the sample as simple as possible I have create all these classes and interfaces in single WCF project without worrying about the modularization.</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">&nbsp;</p>
<p style="margin: 0in;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/52/76/metablogapi/7065.clip_image001_46A4360C.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-52-76-metablogapi/7065.clip_5F00_image001_5F00_46A4360C.png"><img style="display: inline; background-image: none;" title="clip_image001" border="0" alt="clip_image001" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/52/76/metablogapi/4010.clip_image001_thumb_0FE6DB08.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-52-76-metablogapi/4010.clip_5F00_image001_5F00_thumb_5F00_0FE6DB08.png" width="244" height="203" /></a></p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><strong>Code forLoggingAttribute.</strong></p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"></p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">Note how this class is inherited from Attribute class and implementing IOperationBehavior. Methods of IOperationBehavior will be called by ServiceHost at the time of service initialization process to give you a chance to register your inspectors. In this example I am registring LoggingInspector instance.</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">using System;</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">using System.Collections.Generic;</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">using System.Linq;</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">using System.Web;</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">using System.ServiceModel.Description;</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">namespaceSampleService</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">{</p>
<p style="margin: 0in 0in 0in 0.375in; font-family: calibri; font-size: 11pt;">public class LoggingAttribute : Attribute, IOperationBehavior</p>
<p style="margin: 0in 0in 0in 0.375in; font-family: calibri; font-size: 11pt;">{</p>
<blockquote>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>public voidAddBindingParameters(OperationDescription operationDescription, System.ServiceModel.Channels.BindingParameterCollection bindingParameters)</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{</p>
</blockquote>
<blockquote>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>//for this example no implementation is required in this method.</p>
</blockquote>
<blockquote>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}</p>
</blockquote>
<blockquote>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>public voidApplyClientBehavior(OperationDescription operationDescription, System.ServiceModel.Dispatcher.ClientOperation clientOperation)</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>//for this example no implementation is required in this method.</p>
</blockquote>
<blockquote>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">&nbsp;</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>public voidApplyDispatchBehavior(OperationDescription operationDescription, System.ServiceModel.Dispatcher.DispatchOperation dispatchOperation)</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>//Register your inspector class</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>dispatchOperation.ParameterInspectors.Add(new LoggingInspector());</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}</p>
</blockquote>
<blockquote>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>public void Validate(OperationDescription operationDescription)</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>//for this example no implementation is required in this method.</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp; </span>}</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">}</p>
</blockquote>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><strong>Code forLoggingInspector:</strong></p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"></p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">Note: LoggingInspector is implementing IParameterInspector interface and providing the logging functionality.</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">&nbsp;</p>
<p></p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">using System;</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">using System.Collections.Generic;</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">using System.Linq;</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">using System.Web;</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">using System.ServiceModel.Dispatcher;</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">namespaceSampleService</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">{</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp; </span>public class LoggingInspector :IParameterInspector</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp; </span>{</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>public void AfterCall(stringoperationName, object[] outputs, object returnValue, object correlationState)</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>//Your can put any logging code here. here is the dummy one.</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Console.WriteLine(string.Format("Method exit : {0}",operationName));</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">&nbsp;</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>public object BeforeCall(stringoperationName, object[] inputs)</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>//Your can put any logging code here. here is the dummy one.</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Console.WriteLine(string.Format("Method entry : {0}",operationName));</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>return null;</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp; </span>}</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">}</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><strong>Code forISampleService service contract interface:</strong></p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"></p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">Here I am applying my own custom attribute to enable automatic logging on IncrementNumber method.</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">&nbsp;</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">using System;</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">using System.Collections.Generic;</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">using System.Linq;</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">using System.Runtime.Serialization;</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">using System.ServiceModel;</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">using System.ServiceModel.Web;</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">using System.Text;</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">namespaceSampleService</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">{</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp; </span>[ServiceContract]</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp; </span>public interface ISampleService</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp; </span>{</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>[OperationContract]</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>[Logging]</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>int IncrementNumber(int number);</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp; </span>}</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">}</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">&nbsp;</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><strong>Code forSampleService implementation:</strong></p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"></p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">Note: There is no logging related implementation inside IncrementNumber method implementation.</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">&nbsp;</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">using System;</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">using System.Collections.Generic;</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">using System.Linq;</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">using System.Runtime.Serialization;</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">using System.ServiceModel;</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">using System.ServiceModel.Web;</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">using System.Text;</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">&nbsp;</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">namespaceSampleService</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">{</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp; </span>public class SampleService : ISampleService</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp; </span>{</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>public int IncrementNumber(int number)</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>return number++;</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp; </span>}</p>
<p style="margin: 0in; font-family: calibri; font-size: 11pt;">}</p>]]></content:encoded>
    </item>
  </channel>
</rss>