<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tallan&#039;s Technology Blog &#187; jraymunt</title>
	<atom:link href="http://blog.tallan.com/author/jraymunt/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.tallan.com</link>
	<description>Tallan&#039;s Top Technologists Share Their Thoughts on Today&#039;s Technology Challenges</description>
	<lastBuildDate>Mon, 06 Feb 2012 02:15:46 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Intro to PLINQ</title>
		<link>http://blog.tallan.com/2010/07/01/plinq/</link>
		<comments>http://blog.tallan.com/2010/07/01/plinq/#comments</comments>
		<pubDate>Thu, 01 Jul 2010 22:13:44 +0000</pubDate>
		<dc:creator>jraymunt</dc:creator>
				<category><![CDATA[.NET Framework]]></category>
		<category><![CDATA[Enterprise .NET]]></category>
		<category><![CDATA[LINQ]]></category>
		<category><![CDATA[Parallel]]></category>
		<category><![CDATA[PLINQ]]></category>

		<guid isPermaLink="false">http://blog.tallan.com/?p=559</guid>
		<description><![CDATA[I recently had the opportunity to attend the Microsoft launch event for the new Visual Studio 2010.  I was impressed with everything 2010 is bringing to the table, but what really caught my eye is the new Parallel FX library.  Parallel FX provides developers with a set of tools which promises faster and [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had the opportunity to attend the Microsoft launch event for the new Visual Studio 2010.  I was impressed with everything 2010 is bringing to the table, but what really caught my eye is the new Parallel FX library.  Parallel FX provides developers with a set of tools which promises faster and less error prone development of multi-threaded applications.  For this post I’m going to focus in on the new parallel LINQ, also known as PLINQ (which reminds me of Plinko every time I hear it).</p>
<p>For those of you who aren’t familiar with LINQ, I’ll try to sum it up in a few sentences.  LINQ stands for language-integrated query.  It provides .Net developers with a new syntax which makes performing set based operations on a collection, or multiple collections easier.  For example, if we have an unordered list of integers which we need to sort, in the past we would have to do something similar to this:</p>
<pre class="brush: csharp;">
public void RunSort()
{
  var integerList = new List&lt;int&gt; { 5, 63, 23, 1, 0, 91 };
  QuickSort(0, integerList.Count, integerList);
}

public void QuickSort(int left, int right, IList&lt;int&gt; integerList)
{
  var pivot = integerList[left];

  while (left &lt; right)
  {
    while ((integerList[right] &gt;= pivot) &amp;&amp; (left &lt; right))
    {
      right--;
    }

    if (left != right)
    {
      integerList[left] = integerList[right];
      left++;
    }

    while ((integerList[left] &lt;= pivot) &amp;&amp; (left &lt; right))
    {
      left++;
    }

    if (left == right) continue;
    integerList[right] = integerList[left];
    right--;
  }

  integerList[left] = pivot;
  pivot = left;

  if (left &lt; pivot)
  {
    QuickSort(left, pivot - 1, integerList);
  }

  if (right &gt; pivot)
  {
    QuickSort(pivot + 1, right, integerList);
  }
}
</pre>
<p>The above example works fine, however as a developer we needed to make the decision of what sorting algorithm to use, and then go ahead and implement the sorting function.  This wastes time and can sometimes be error prone.  LINQ can solve this problem, and many other set based problems like it quickly and efficiently.  Here is an example of the first example re-written to make use of LINQ:</p>
<pre class="brush: csharp;">
public void RunSort()
{
    var integerList = new List { 5, 63, 23, 1, 0, 91 };
    var sortedIntegerList = from integer in integerList
                            orderby integer ascending
                            select integer;
}
</pre>
<p>LINQ takes care of the sorting here for us and provides a nice, easy to read syntax.  When using LINQ, we can worry less about the details of working with data sets, and focus more about the business rules we are implementing.  PLINQ takes LINQ a step further and extends this powerful set based functionality to take advantage of multi-core CPU’s.  Here is an example of the second example converted to use PLINQ:</p>
<pre class="brush: csharp;">
public void RunSort()
{
    var integerList = new List { 5, 63, 23, 1, 0, 91 };
    var sortedIntegerList = from integer in integerList.AsParallel()
                            orderby integer ascending
                            select integer;
}
</pre>
<p>When comparing the above example with the second example, only a couple of things have changed.  One is obvious just by looking at the code.  We are now calling the extension method .AsParallel on the list of integers.  This tells PLINQ that it is OK to go ahead and try to parallelize the LINQ query.  The second is a little more subtle.  Instead of the LINQ query returning an IEnumerable type, it is returning an IParallelEnumerable.  Luckily, IParallelEnumerable derives from IEnumerable, so existing code should work fine with this change.</p>
<p>This is of course a very basic example of how LINQ and PLINQ differ.  But hopefully I’ve sparked some interest.</p>
<p>-Jon</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tallan.com/2010/07/01/plinq/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a Project Installer for a Windows Service</title>
		<link>http://blog.tallan.com/2009/06/01/creating-a-project-installer-for-a-windows-service/</link>
		<comments>http://blog.tallan.com/2009/06/01/creating-a-project-installer-for-a-windows-service/#comments</comments>
		<pubDate>Mon, 01 Jun 2009 18:00:10 +0000</pubDate>
		<dc:creator>jraymunt</dc:creator>
				<category><![CDATA[.NET Framework]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Windows Services]]></category>

		<guid isPermaLink="false">http://blogs.tallan.com/dotnetreflections/?p=148</guid>
		<description><![CDATA[I recently had to create a Windows Service for a project I&#8217;m currently working on.  Rather than installing/uninstalling using InstallUtil, I decided to create a project installer to do the work for me.  It took a little bit of digging to gather all of the necessary steps, so here is what I did to get [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had to create a Windows Service for a project I&#8217;m currently working on.  Rather than installing/uninstalling using InstallUtil, I decided to create a project installer to do the work for me.  It took a little bit of digging to gather all of the necessary steps, so here is what I did to get up and running.</p>
<ol>
<li>Create your Windows Service project and Windows Service.</li>
<li>Navigate to the designer for your Windows Service. Under the properties for your service you should see (Name) and ServiceName. Fill in both of these properties with your desired names. You will need to reference these later.</li>
<li>In the designer for your Windows Service, right-click and click Add Installer. You should now have a ProjectInstaller.cs file, along with a designer file for the installer.</li>
<li>Navigate to the designer for your new project installer. You should see two components, a Service Process Installer and a Service Installer. Under the Service Installer properties, you will need to add a DisplayName, and provide the ServiceName of the service you will be installing. The ServiceName must match the (Name) property of the service.</li>
<li>Build your Windows Service project. Now in the same solution, add a new Setup Project. This will provide the Wizard interface for the installation process.</li>
<li>After adding the project, you need to add the primary output of your Windows Service to the Setup Project. Do this by right-clicking on the Setup Project -&gt; Add -&gt; Project Output. Select your Windows Service project from the drop down, highlight Primary Output and click OK.</li>
<li>Up to this point the installer will install the correct files, but it doesn&#8217;t know what to do with the files. We can add custom actions to do the service installation work. Right-click on the Setup Project -&gt; View -&gt; Custom Actions. For a Windows Service we need to add actions for Install, Rollback, and Uninstall. Right-click each of these and click Add Action. Double click Application Folder and select the Primary Output from your Windows Service project.</li>
<li>You can now build your Setup Project. The output of this build will be two setup files which are used to install your new Windows Service.</li>
</ol>
<p>-Jon</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tallan.com/2009/06/01/creating-a-project-installer-for-a-windows-service/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WCF Security Part 1</title>
		<link>http://blog.tallan.com/2009/03/11/wcf-security-part-1/</link>
		<comments>http://blog.tallan.com/2009/03/11/wcf-security-part-1/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 01:48:47 +0000</pubDate>
		<dc:creator>jraymunt</dc:creator>
				<category><![CDATA[.NET Framework]]></category>
		<category><![CDATA[WCF]]></category>

		<guid isPermaLink="false">http://blogs.tallan.com/dotnetreflections/?p=115</guid>
		<description><![CDATA[A few months ago I was given the task of setting up security for some WCF services we had created. After a couple days of scouring the internet for ideas and solutions, I ended up purchasing a book on WCF. Although there is a lot of information on the web about WCF and what security [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal">A few months ago I was given the task of setting up security for some WCF services we had created.<span> </span>After a couple days of scouring the internet for ideas and solutions, I ended up purchasing a book on WCF.<span> </span>Although there is a lot of information on the web about WCF and what security methods are available to us as developers, the information was always incomplete, and connecting the dots wasn&#8217;t the easiest.<span> </span>The example below shows how we can setup message based WCF security for a service which will be accessed over the internet, although the same code could be used for an intranet application as well.<span> </span>The example will require both user authentication and an x509 certificate.</p>
<p class="MsoNormal">For our WCF service, we&#8217;re using the wsHttpBinding.<span> </span>This binding provides much of the same functionality as a basic web service, with added service features such as reliable messaging, WS-Addressing, and WS-Security.<span> </span>Since this post is mainly on setting up security for a WCF service, I won&#8217;t go into too many details of the other features of wsHttpBinding.</p>
<p class="MsoNormal">After creating the WCF service, open up the web.config file for the WCF Service Application project.<span> </span>After scrolling down for a long time, you should come across a System.serviceModel tag.<span> </span>This tag contains all of the configuration settings for the WCF services contained in this project.<span> </span>Here&#8217;s what you should be looking at now:</p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span>&lt;</span><span>system.serviceModel</span><span>&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span>&lt;</span><span>services</span><span>&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span>&lt;</span><span>service</span><span> </span><span>name</span><span>=</span><span>&#8220;<span style="color: blue">WcfService1.Service1</span>&#8220;<span style="color: blue"> </span><span style="color: red">behaviorConfiguration</span><span style="color: blue">=</span>&#8220;<span style="color: blue">WcfService1.Service1Behavior</span>&#8220;<span style="color: blue">&gt;</span></span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span>&lt;!&#8211;</span><span> Service Endpoints </span><span>&#8211;&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span>&lt;</span><span>endpoint</span><span> </span><span>address</span><span>=</span><span>&#8220;&#8221;<span style="color: blue"> </span><span style="color: red">binding</span><span style="color: blue">=</span>&#8220;<span style="color: blue">wsHttpBinding</span>&#8220;<span style="color: blue"> </span><span style="color: red">contract</span><span style="color: blue">=</span>&#8220;<span style="color: blue">WcfService1.IService1</span>&#8220;<span style="color: blue">&gt;</span></span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span>&lt;!&#8211;</span><span> </span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span>Upon deployment, the following identity element should be removed or replaced to reflect the </span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span>identity under which the deployed service runs.<span> </span>If removed, WCF will infer an appropriate identity </span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span>automatically.</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span></span><span>&#8211;&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span>&lt;</span><span>identity</span><span>&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span>&lt;</span><span>dns</span><span> </span><span>value</span><span>=</span><span>&#8220;<span style="color: blue">localhost</span>&#8220;<span style="color: blue">/&gt;</span></span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span>&lt;/</span><span>identity</span><span>&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span>&lt;/</span><span>endpoint</span><span>&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span>&lt;</span><span>endpoint</span><span> </span><span>address</span><span>=</span><span>&#8220;<span style="color: blue">mex</span>&#8220;<span style="color: blue"> </span><span style="color: red">binding</span><span style="color: blue">=</span>&#8220;<span style="color: blue">mexHttpBinding</span>&#8220;<span style="color: blue"> </span><span style="color: red">contract</span><span style="color: blue">=</span>&#8220;<span style="color: blue">IMetadataExchange</span>&#8220;<span style="color: blue">/&gt;</span></span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span>&lt;/</span><span>service</span><span>&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span>&lt;/</span><span>services</span><span>&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span>&lt;</span><span>behaviors</span><span>&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span>&lt;</span><span>serviceBehaviors</span><span>&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span>&lt;</span><span>behavior</span><span> </span><span>name</span><span>=</span><span>&#8220;<span style="color: blue">WcfService1.Service1Behavior</span>&#8220;<span style="color: blue">&gt;</span></span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span>&lt;!&#8211;</span><span> To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment </span><span>&#8211;&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span>&lt;</span><span>serviceMetadata</span><span> </span><span>httpGetEnabled</span><span>=</span><span>&#8220;<span style="color: blue">true</span>&#8220;<span style="color: blue">/&gt;</span></span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span>&lt;!&#8211;</span><span> To receive exception details in faults for debugging purposes, set the value below to true.<span> </span>Set to false before deployment to avoid disclosing exception information </span><span>&#8211;&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span>&lt;</span><span>serviceDebug</span><span> </span><span>includeExceptionDetailInFaults</span><span>=</span><span>&#8220;<span style="color: blue">false</span>&#8220;<span style="color: blue">/&gt;</span></span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span>&lt;/</span><span>behavior</span><span>&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span>&lt;/</span><span>serviceBehaviors</span><span>&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span>&lt;/</span><span>behaviors</span><span>&gt;</span></p>
<p class="MsoNormal"><span><span> </span>&lt;/</span><span>system.serviceModel</span><span>&gt;</span></p>
<p class="MsoNormal"><span>By default, a WCF service will use the wsHttpBinding, this is what we want to continue using.<span> </span>We need to make a few modifications to this web.config in order to provide the additional functionality we want.<span> </span>First take a look at the serviceBehaviors section.<span> </span>By default we already have a behavior for our Service1.<span> </span>Here is an example of a modified behavior:</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span>&lt;</span><span>behavior</span><span> </span><span>name</span><span>=</span><span>&#8220;<span style="color: blue">WcfService1.Service1Behavior</span>&#8220;<span style="color: blue">&gt;</span></span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span>&lt;</span><span>serviceCredentials</span><span>&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span>&lt;</span><span>serviceCertificate</span><span> </span><span>findValue</span><span>=</span><span>&#8220;<span style="color: blue">CN=ServiceCertificate</span>&#8220;<span style="color: blue"> </span><span style="color: red">storeLocation</span><span style="color: blue">=</span>&#8220;<span style="color: blue">LocalMachine</span>&#8220;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span></span><span>storeName</span><span>=</span><span>&#8220;<span style="color: blue">My</span>&#8220;<span style="color: blue"> </span><span style="color: red">x509FindType</span><span style="color: blue">=</span>&#8220;<span style="color: blue">FindBySubjectDistinguishedName</span>&#8220;<span style="color: blue"> /&gt;</span></span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span>&lt;</span><span>userNameAuthentication</span><span> </span><span>userNamePasswordValidationMode</span><span>=</span><span>&#8220;<span style="color: blue">Windows</span>&#8220;<span style="color: blue">/&gt;</span></span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span>&lt;/</span><span>serviceCredentials</span><span>&gt;</span></p>
<p class="MsoNormal"><span><span> </span>&lt;/</span><span>behavior</span><span>&gt;</span></p>
<p class="MsoNormal"><span>There is a lot of info in this behavior pertaining to security.<span> </span>The first bit describes the x509 certificate we would like to use that is already installed on our machine.<span> </span>We can create our own test x509 certificate for development purposes if need be.<span> </span>We can also describe the user authentication mode, in this case we are just using Windows authentication.</span></p>
<p class="MsoNormal"><span>The next section extends the wsHttpBinding to provide some additional features not turned on be default:</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span>&lt;</span><span>bindings</span><span>&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span>&lt;</span><span>wsHttpBinding</span><span>&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span>&lt;</span><span>binding</span><span> </span><span>name</span><span>=</span><span>&#8220;<span style="color: blue">wsHttpBindingSettings</span>&#8220;<span style="color: blue"> </span><span style="color: red">messageEncoding</span><span style="color: blue">=</span>&#8220;<span style="color: blue">Text</span>&#8220;<span style="color: blue">&gt;</span></span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span>&lt;</span><span>security</span><span> </span><span>mode</span><span>=</span><span>&#8220;<span style="color: blue">Message</span>&#8220;<span style="color: blue">&gt;</span></span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span>&lt;</span><span>message</span><span> </span><span>clientCredentialType</span><span>=</span><span>&#8220;<span style="color: blue">UserName</span>&#8220;<span style="color: blue"> /&gt;</span></span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span>&lt;/</span><span>security</span><span>&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span>&lt;/</span><span>binding</span><span>&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span>&lt;/</span><span>wsHttpBinding</span><span>&gt;</span></p>
<p class="MsoNormal"><span><span> </span>&lt;/</span><span>bindings</span><span>&gt;</span></p>
<p class="MsoNormal"><span>Here we can describe the transport type, as well as the client credential type.<span> </span>This is fairly simple, we are using Message based transport with UserName security.</span></p>
<p class="MsoNormal"><span>Finally we need to tie these sections together with Service1:</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span>&lt;</span><span>service</span><span> </span><span>behaviorConfiguration</span><span>=</span><span>&#8220;<span style="color: blue">WcfService1.Service1Behavior</span>&#8220;<span style="color: blue"> </span><span style="color: red">name</span><span style="color: blue">=</span>&#8220;<span style="color: blue">WcfService1.Service1Behavior</span>&#8220;<span style="color: blue">&gt;</span></span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span>&lt;</span><span>endpoint</span><span> </span><span>address</span><span>=</span><span>&#8220;&#8221;<span style="color: blue"> </span><span style="color: red">binding</span><span style="color: blue">=</span>&#8220;<span style="color: blue">wsHttpBinding</span>&#8220;<span style="color: blue"> </span><span style="color: red">bindingConfiguration</span><span style="color: blue">=</span>&#8220;<span style="color: blue">wsHttpBindingSettings</span>&#8220;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span></span><span>contract</span><span>=</span><span>&#8220;<span style="color: blue">WcfService1.IService1</span>&#8220;<span style="color: blue"> </span><span style="color: red">listenUriMode</span><span style="color: blue">=</span>&#8220;<span style="color: blue">Explicit</span>&#8220;<span style="color: blue">&gt;</span></span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span>&lt;</span><span>identity</span><span>&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span>&lt;</span><span>dns</span><span> </span><span>value</span><span>=</span><span>&#8220;<span style="color: blue">ServiceCertficate</span>&#8220;<span style="color: blue"> /&gt;</span></span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span>&lt;/</span><span>identity</span><span>&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span>&lt;/</span><span>endpoint</span><span>&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt;line-height: normal"><span><span> </span>&lt;</span><span>endpoint</span><span> </span><span>address</span><span>=</span><span>&#8220;<span style="color: blue">mex</span>&#8220;<span style="color: blue"> </span><span style="color: red">binding</span><span style="color: blue">=</span>&#8220;<span style="color: blue">mexHttpBinding</span>&#8220;<span style="color: blue"> </span><span style="color: red">contract</span><span style="color: blue">=</span>&#8220;<span style="color: blue">IMetadataExchange</span>&#8220;<span style="color: blue"> /&gt;</span></span></p>
<p class="MsoNormal"><span><span> </span>&lt;/</span><span>service</span><span>&gt;</span></p>
<p class="MsoNormal"><span>The only changes we made here are in the bindingConfiguration property and the dns value.<span> </span>The bindingConfiguration allows you to bind our binding configuration to this service, and the dns value should match the x509 certificate name.</span></p>
<p class="MsoNormal"><span>I&#8217;ll be posting some more on this topic, including writing your own custom username validation code for WCF, and creating your own test x509 certificate.<span> </span>Hope this helps!</span></p>
<p class="MsoNormal"><span>-Jon</span></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tallan.com/2009/03/11/wcf-security-part-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using XSLT in .Net</title>
		<link>http://blog.tallan.com/2008/09/08/using-xslt-in-net/</link>
		<comments>http://blog.tallan.com/2008/09/08/using-xslt-in-net/#comments</comments>
		<pubDate>Mon, 08 Sep 2008 18:07:36 +0000</pubDate>
		<dc:creator>jraymunt</dc:creator>
				<category><![CDATA[.NET Framework]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[xml]]></category>
		<category><![CDATA[xslcompiledtransform]]></category>
		<category><![CDATA[xslt]]></category>
		<category><![CDATA[xsltransform]]></category>

		<guid isPermaLink="false">http://blogs.tallan.com/dotnetreflections/?p=45</guid>
		<description><![CDATA[So you&#8217;ve finished writing your new XSLT file using your favorite XML/XSLT editing tool. Great. Now for the next problem, you&#8217;ve been given the task to transform thousands of XML documents using your new XSLT file. Great&#8230; There&#8217;s no way we can transform all of these documents by hand. At this point we should be [...]]]></description>
			<content:encoded><![CDATA[<p>So you&#8217;ve finished writing your new XSLT file using your favorite XML/XSLT editing tool. Great. Now for the next problem, you&#8217;ve been given the task to transform thousands of XML documents using your new XSLT file. Great&#8230; There&#8217;s no way we can transform all of these documents by hand. At this point we should be thinking about automating this process in the fastest and most efficient way possible. This scenario may sound familiar to some of us. Luckily, .Net provides us with such options.</p>
<p>For this example we&#8217;ll be serializing an XML file and transforming it using .Net&#8217;s XSLT processor. The process is very simple, and requires very little code.</p>
<ol>
<li>Load the XML File into memory using the XmlReader class.
<pre>var reader = XmlReader.Create(xmlFileLocation);</pre>
</li>
<li>Create a StreamWriter object which will be used to write the transformation to a file.
<pre>var textWriter = new StreamWriter(outputFileLocation);</pre>
</li>
<li>Create an XslCompiledTransform object which will be used to transform the XML file using the specified XSLT file.
<pre>var xslTransform = new XslCompiledTransform();</pre>
</li>
<li>Transform the XML and write to a file using the StreamWriter.
<pre>xslTransform.Load(xsltFileLocation);
xslTransform.Transform(reader, null, textWriter);</pre>
</li>
</ol>
<p>Hope this helps.</p>
<p>-Jon</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tallan.com/2008/09/08/using-xslt-in-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

