<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Valeriu Caraulean &#187; WCF</title>
	<atom:link href="http://blog.caraulean.com/category/wcf/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.caraulean.com</link>
	<description>Keep it simple. It will work...</description>
	<lastBuildDate>Mon, 30 Aug 2010 14:14:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.caraulean.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/ebb92897c67d3455530a804313905fe1?s=96&#038;d=http://s2.wp.com/i/buttonw-com.png</url>
		<title>Valeriu Caraulean &#187; WCF</title>
		<link>http://blog.caraulean.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.caraulean.com/osd.xml" title="Valeriu Caraulean" />
	<atom:link rel='hub' href='http://blog.caraulean.com/?pushpress=hub'/>
		<item>
		<title>WCF Security Guidance</title>
		<link>http://blog.caraulean.com/2008/03/28/wcf-security-guidance/</link>
		<comments>http://blog.caraulean.com/2008/03/28/wcf-security-guidance/#comments</comments>
		<pubDate>Fri, 28 Mar 2008 09:44:31 +0000</pubDate>
		<dc:creator>Valeriu Caraulean</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[WCF]]></category>

		<guid isPermaLink="false">http://varely.wordpress.com/2008/03/28/wcf-security-guidance/</guid>
		<description><![CDATA[It seems to be that Patterns &#38; Practices team continues to do what they do the best &#8211; creating guidance within different development areas. The last release of this group is the WCF Security Guidance. It contains description for a few application scenarios &#38; a list of various How-Tos, including few video walkthroughs of common [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.caraulean.com&amp;blog=1485392&amp;post=17&amp;subd=varely&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It seems to be that Patterns &amp; Practices team continues to do what they do the best &#8211; creating guidance within different development areas. </p>
<p>The last release of this group is the <a href="http://www.codeplex.com/WCFSecurity/">WCF Security Guidance</a>. It contains description for a few application scenarios &amp; a list of various How-Tos, including few video walkthroughs of common WCF solutions.</p>
<p>It&#8217;s different from usual way to dig into WCF infrastructure details. It&#8217;s not crawling over hundreds of MSDN pages, it&#8217;s not like reading MSDN samples trying to understand what&#8217;s going on.</p>
<p>It is a very detailed step-by-step description on how to do some tasks touching different aspects of WCF, starting from opening a certificates store, and ending with deployment advices.</p>
<p>Keep it going, P&amp;P!</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/varely.wordpress.com/17/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/varely.wordpress.com/17/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/varely.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/varely.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/varely.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/varely.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/varely.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/varely.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/varely.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/varely.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/varely.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/varely.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/varely.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/varely.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/varely.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/varely.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.caraulean.com&amp;blog=1485392&amp;post=17&amp;subd=varely&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.caraulean.com/2008/03/28/wcf-security-guidance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5d96a7814c830eb5ee8e12b677212cae?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">varely</media:title>
		</media:content>
	</item>
		<item>
		<title>HttpContext idiom for Windows Communication Foundation.</title>
		<link>http://blog.caraulean.com/2008/02/13/httpcontext-idiom-for-windows-communication-foundation/</link>
		<comments>http://blog.caraulean.com/2008/02/13/httpcontext-idiom-for-windows-communication-foundation/#comments</comments>
		<pubDate>Wed, 13 Feb 2008 14:13:37 +0000</pubDate>
		<dc:creator>Valeriu Caraulean</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[WCF]]></category>

		<guid isPermaLink="false">http://varely.wordpress.com/2008/02/13/httpcontext-idiom-for-windows-communication-foundation/</guid>
		<description><![CDATA[WCF infrastructure allows you to store context sensitive data in InstanceContext of the service instance. For that you should implement from IExtension&#60;InstanceContext&#62; and plug that class into WCF&#8217;s infrastructure in any of available ways. When I worked on a class that can store contextual information in Web context or WCF context depending on some configuration [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.caraulean.com&amp;blog=1485392&amp;post=15&amp;subd=varely&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>WCF infrastructure allows you to store context sensitive data in InstanceContext of the service instance. For that you should implement from IExtension&lt;InstanceContext&gt; and plug that class into WCF&#8217;s infrastructure in any of available ways. </p>
<p>When I worked on a class that can store contextual information in Web context or WCF context depending on some configuration parameters, I preferred to have similar idioms, and I wrote an HttpContext-like class for WCF.</p>
<pre><span style="color:gray;">///&lt;summary&gt;
/// </span><span style="color:green;">This class incapsulates context information for a service instance
</span><span style="color:gray;">///&lt;/summary&gt;
</span><span style="color:blue;">public class </span><span style="color:#2b91af;">WcfInstanceContext </span>: <span style="color:#2b91af;">IExtension</span>&lt;<span style="color:#2b91af;">InstanceContext</span>&gt;
{
    <span style="color:blue;">private readonly </span><span style="color:#2b91af;">IDictionary </span>items;

    <span style="color:blue;">private </span>WcfInstanceContext()
    {
        items = <span style="color:blue;">new </span><span style="color:#2b91af;">Hashtable</span>();
    }

    <span style="color:gray;">///&lt;summary&gt;
    /// &lt;see cref="IDictionary"/&gt; </span><span style="color:green;">stored in current instance context.
    </span><span style="color:gray;">///&lt;/summary&gt;
    </span><span style="color:blue;">public </span><span style="color:#2b91af;">IDictionary </span>Items
    {
        <span style="color:blue;">get </span>{ <span style="color:blue;">return </span>items; }
    }

    <span style="color:gray;">///&lt;summary&gt;
    /// </span><span style="color:green;">Gets the current instance of </span><span style="color:gray;">&lt;see cref="WcfInstanceContext"/&gt;
    ///&lt;/summary&gt;
    </span><span style="color:blue;">public static </span><span style="color:#2b91af;">WcfInstanceContext </span>Current
    {
        <span style="color:blue;">get
        </span>{
            <span style="color:#2b91af;">WcfInstanceContext </span>context = <span style="color:#2b91af;">OperationContext</span>.Current.InstanceContext.Extensions.Find&lt;<span style="color:#2b91af;">WcfInstanceContext</span>&gt;();
            <span style="color:blue;">if </span>(context == <span style="color:blue;">null</span>)
            {
                context = <span style="color:blue;">new </span><span style="color:#2b91af;">WcfInstanceContext</span>();
                <span style="color:#2b91af;">OperationContext</span>.Current.InstanceContext.Extensions.Add(context);
            }
            <span style="color:blue;">return </span>context;
        }
    }

    <span style="color:gray;">/// &lt;summary&gt;
    /// &lt;see cref="IExtension{T}"/&gt; </span><span style="color:green;">Attach() method
    </span><span style="color:gray;">/// &lt;/summary&gt;
    </span><span style="color:blue;">public void </span>Attach(<span style="color:#2b91af;">InstanceContext </span>owner) { }

    <span style="color:gray;">/// &lt;summary&gt;
    /// &lt;see cref="IExtension{T}"/&gt; </span><span style="color:green;">Detach() method
    </span><span style="color:gray;">/// &lt;/summary&gt;
    </span><span style="color:blue;">public void </span>Detach(<span style="color:#2b91af;">InstanceContext </span>owner) { }

}</pre>
<p>Now, you can use this class to store and retrieve data in the same manner as you&#8217;re working with HttpContext:</p>
<pre>    WcfInstanceContext.Current.Items[<span style="color:rgb(163,21,21);">"key"</span>] = <span style="color:rgb(0,0,255);">new</span> MyClass();
    MyClass myClass = WcfInstanceContext.Current.Items[<span style="color:rgb(163,21,21);">"key"</span>] <span style="color:rgb(0,0,255);">as</span> MyClass;
</pre>
<p><a href="http://11011.net/software/vspaste"><a href="http://11011.net/software/vspaste"></a></p>
<p>&nbsp;</p>
<p>Of course, when doing this you should be inside of WCF session&#8230;</p>
<p>Enjoy!</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/varely.wordpress.com/15/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/varely.wordpress.com/15/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/varely.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/varely.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/varely.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/varely.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/varely.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/varely.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/varely.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/varely.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/varely.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/varely.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/varely.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/varely.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/varely.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/varely.wordpress.com/15/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.caraulean.com&amp;blog=1485392&amp;post=15&amp;subd=varely&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.caraulean.com/2008/02/13/httpcontext-idiom-for-windows-communication-foundation/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5d96a7814c830eb5ee8e12b677212cae?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">varely</media:title>
		</media:content>
	</item>
	</channel>
</rss>