<?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>Alex Sarafian as Developer</title>
	<atom:link href="http://sarafianalex.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://sarafianalex.wordpress.com</link>
	<description>Adventures in C# Land and some SQL</description>
	<lastBuildDate>Fri, 04 Sep 2009 11:27:50 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='sarafianalex.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/ea38bb69738d229a89ab00b82aad64b7?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Alex Sarafian as Developer</title>
		<link>http://sarafianalex.wordpress.com</link>
	</image>
			<item>
		<title>Database Size</title>
		<link>http://sarafianalex.wordpress.com/2009/09/04/database-size/</link>
		<comments>http://sarafianalex.wordpress.com/2009/09/04/database-size/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 10:12:54 +0000</pubDate>
		<dc:creator>Sarafian Alex</dc:creator>
				<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://sarafianalex.wordpress.com/2009/09/04/database-size/</guid>
		<description><![CDATA[DECLARE @dbName VARCHAR(100)
SET @dbName='DATABASE_NAME'
Select
    sd.name as DBName
    ,mf.name as FileName
    ,case mf.file_id
        when 1 then 'Main'
        when 2 then 'Log'
    END as FileType
    ,mf.file_id
   [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sarafianalex.wordpress.com&blog=2367780&post=69&subd=sarafianalex&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><pre class="code"><span style="color:blue;">DECLARE </span>@dbName <span style="color:blue;">VARCHAR</span><span style="color:gray;">(</span>100<span style="color:gray;">)
</span><span style="color:blue;">SET </span>@dbName<span style="color:gray;">=</span><span style="color:red;">'DATABASE_NAME'
</span><span style="color:blue;">Select
    </span>sd<span style="color:gray;">.</span>name <span style="color:blue;">as </span>DBName
    <span style="color:gray;">,</span>mf<span style="color:gray;">.</span>name <span style="color:blue;">as FileName
    </span><span style="color:gray;">,</span><span style="color:blue;">case </span>mf<span style="color:gray;">.</span><span style="color:magenta;">file_id
        </span><span style="color:blue;">when </span>1 <span style="color:blue;">then </span><span style="color:red;">'Main'
        </span><span style="color:blue;">when </span>2 <span style="color:blue;">then </span><span style="color:red;">'Log'
    </span><span style="color:blue;">END as </span>FileType
    <span style="color:gray;">,</span>mf<span style="color:gray;">.</span><span style="color:magenta;">file_id
    </span><span style="color:gray;">,</span><span style="color:magenta;">CONVERT</span><span style="color:gray;">(</span><span style="color:blue;">varchar</span><span style="color:gray;">(</span>100<span style="color:gray;">), </span><span style="color:magenta;">Convert</span><span style="color:gray;">(</span><span style="color:blue;">decimal</span><span style="color:gray;">(</span>10<span style="color:gray;">,</span>2<span style="color:gray;">),(((</span><span style="color:magenta;">Sum</span><span style="color:gray;">(</span><span style="color:magenta;">Convert</span><span style="color:gray;">(</span><span style="color:blue;">decimal</span><span style="color:gray;">(</span>10<span style="color:gray;">,</span>2<span style="color:gray;">),</span>mf<span style="color:gray;">.</span>size<span style="color:gray;">))      * </span>8000<span style="color:gray;">)/</span>1024<span style="color:gray;">)/</span>1024<span style="color:gray;">)))+</span><span style="color:red;">' MB' </span><span style="color:blue;">as </span>SIZE
<span style="color:blue;">from </span><span style="color:green;">sys</span><span style="color:gray;">.</span><span style="color:green;">databases </span>sd
<span style="color:gray;">join </span><span style="color:green;">sys</span><span style="color:gray;">.</span><span style="color:green;">master_files </span>mf
<span style="color:blue;">on </span>sd<span style="color:gray;">.</span>database_ID <span style="color:gray;">= </span>mf<span style="color:gray;">.</span>database_ID
<span style="color:gray;">AND </span>sd<span style="color:gray;">.</span>name<span style="color:gray;">=</span>@dbName
<span style="color:blue;">GROUP BY </span>sd<span style="color:gray;">.</span>name<span style="color:gray;">,</span>mf<span style="color:gray;">.</span>name<span style="color:gray;">,</span>mf<span style="color:gray;">.</span>database_id<span style="color:gray;">,</span>mf<span style="color:gray;">.</span><span style="color:magenta;">file_id</span></pre>
<pre class="code"><span style="color:magenta;"></span></pre>
</p>
<p>The above script when @dbName is set calculates the size of a database for the mdf and log file seperately.</p>
Posted in SQL  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sarafianalex.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sarafianalex.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sarafianalex.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sarafianalex.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sarafianalex.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sarafianalex.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sarafianalex.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sarafianalex.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sarafianalex.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sarafianalex.wordpress.com/69/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sarafianalex.wordpress.com&blog=2367780&post=69&subd=sarafianalex&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://sarafianalex.wordpress.com/2009/09/04/database-size/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/64f00567ef7dda3ec36dcf0e01043d11?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sarafian</media:title>
		</media:content>
	</item>
		<item>
		<title>Jobs seaching and LinkedIN</title>
		<link>http://sarafianalex.wordpress.com/2009/08/30/jobs-seaching-and-linkedin/</link>
		<comments>http://sarafianalex.wordpress.com/2009/08/30/jobs-seaching-and-linkedin/#comments</comments>
		<pubDate>Sun, 30 Aug 2009 15:20:51 +0000</pubDate>
		<dc:creator>Sarafian Alex</dc:creator>
				<category><![CDATA[1]]></category>

		<guid isPermaLink="false">http://sarafianalex.wordpress.com/2009/08/30/jobs-seaching-and-linkedin/</guid>
		<description><![CDATA[Today I created my LinkedIn ID. 
I live in Greece but I would be interested in working abroad as long as the income / living cost is rational.
Since I’m posting here, I should describe what exactly I’ve been doing for the current company I’m working for.
During the last year of my professional life I had [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sarafianalex.wordpress.com&blog=2367780&post=68&subd=sarafianalex&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p align="justify">Today I created my <a href="http://www.linkedin.com/in/sarafian">LinkedIn ID</a>. </p>
<p align="justify">I live in Greece but I would be interested in working abroad as long as the income / living cost is rational.</p>
<p align="justify">Since I’m posting here, I should describe what exactly I’ve been doing for the current company I’m working for.</p>
<p align="justify">During the last year of my professional life I had the role of IT Director, while I’ve been building latest .net technologies application with my coleagues. For the latest application, I’ve created a Modular, Multilanguage framework infrastructure with workflow support. The infrastructure provides a viable solution to give each customer whatever module they want with or without workflow and add a special customization that does not impede on the base modules, thus increasing support and reducing testing costs. The above solution can be plugged in with any identity system that I have come across.</p>
<p align="justify">One potential (implemented) of the above infrastrucre is that you can add workflow support to any other 3rd party application by creating a 3rd party specific module for authentication, and a module for the 3rd’s party objects that we want to make workflow relevant. A generic interface is provided for the 3rd party application to query its objects regarding to the workflow.</p>
<p align="justify">The above infrastrucre supports Client / Server application through WPF, WCF and WWF and is intented to support Web and Silverlight with the same specifications.</p>
<p align="justify">I hope for the best.</p>
Posted in 1  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sarafianalex.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sarafianalex.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sarafianalex.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sarafianalex.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sarafianalex.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sarafianalex.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sarafianalex.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sarafianalex.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sarafianalex.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sarafianalex.wordpress.com/68/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sarafianalex.wordpress.com&blog=2367780&post=68&subd=sarafianalex&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://sarafianalex.wordpress.com/2009/08/30/jobs-seaching-and-linkedin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/64f00567ef7dda3ec36dcf0e01043d11?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sarafian</media:title>
		</media:content>
	</item>
		<item>
		<title>XCEED Datagrid</title>
		<link>http://sarafianalex.wordpress.com/2009/06/02/xceed-datagrid/</link>
		<comments>http://sarafianalex.wordpress.com/2009/06/02/xceed-datagrid/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 12:14:05 +0000</pubDate>
		<dc:creator>Sarafian Alex</dc:creator>
				<category><![CDATA[.NET C#]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://sarafianalex.wordpress.com/2009/06/02/xceed-datagrid/</guid>
		<description><![CDATA[ is changing licensing for the express edition. I’ve been using XCEED’s datagrid control for WPF for a year now, because it was the best grid control I could find, and for some of the controls for Date Time and numeric included in the library.
XCEED is changing licensing for the express edition and&#160; has launched [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sarafianalex.wordpress.com&blog=2367780&post=67&subd=sarafianalex&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p align="justify"> is changing licensing for the express edition. I’ve been using XCEED’s datagrid control for WPF for a year now, because it was the best grid control I could find, and for some of the controls for Date Time and numeric included in the library.</p>
<p align="justify"><a href="http://xceed.com/">XCEED</a> is changing licensing for the express edition and&#160; has launched a campain in order to notify everyone interested in the express edition and still wants to have the benefits he had before the change.</p>
<p align="justify">So just visit <a href="http://xceed.com/freegrid">http://xceed.com/freegrid</a> and update your license.</p>
Posted in .NET C#, WPF  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sarafianalex.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sarafianalex.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sarafianalex.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sarafianalex.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sarafianalex.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sarafianalex.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sarafianalex.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sarafianalex.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sarafianalex.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sarafianalex.wordpress.com/67/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sarafianalex.wordpress.com&blog=2367780&post=67&subd=sarafianalex&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://sarafianalex.wordpress.com/2009/06/02/xceed-datagrid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/64f00567ef7dda3ec36dcf0e01043d11?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sarafian</media:title>
		</media:content>
	</item>
		<item>
		<title>Microsoft.Practices.EnterpriseLibrary.Data DiscoverParameters() Error</title>
		<link>http://sarafianalex.wordpress.com/2009/05/12/microsoft-practices-enterpriselibrary-data-discoverparameters-error/</link>
		<comments>http://sarafianalex.wordpress.com/2009/05/12/microsoft-practices-enterpriselibrary-data-discoverparameters-error/#comments</comments>
		<pubDate>Tue, 12 May 2009 07:06:50 +0000</pubDate>
		<dc:creator>Sarafian Alex</dc:creator>
				<category><![CDATA[.NET C#]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://sarafianalex.wordpress.com/2009/05/12/microsoft-practices-enterpriselibrary-data-discoverparameters-error/</guid>
		<description><![CDATA[I’m generally against the Enterprise Library, but for reasons that are not to be discussed they are consumed in the framework I have developed.
Yesterday I encountered a serious error, that I tracked to the enterprise library.
Keep in mind that the target provider is SQL Server 2005.
At some point the framework builds an sql command that [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sarafianalex.wordpress.com&blog=2367780&post=66&subd=sarafianalex&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p align="justify">I’m generally against the Enterprise Library, but for reasons that are not to be discussed they are consumed in the framework I have developed.</p>
<p align="justify">Yesterday I encountered a serious error, that I tracked to the enterprise library.</p>
<p align="justify">Keep in mind that the target provider is SQL Server 2005.</p>
<p align="justify">At some point the framework builds an sql command that will be user to execute a stored procedure. One of the only two commands used from the library is DiscoverParameters which queries the procedure on the server and fills the paramaters collection on the command object.</p>
<p align="justify">The problem is that even though a parameter is defined as OUTPUT on the database server, the enterprise library insists on marking the parameter with INPUTOUTPUT direction. I surveyed the problem through Internet and Reflector and the database reported the parameters as trully OUTPUT only.</p>
<p align="justify">The solution is to either write your own DiscoverParameters which is not that difficult rather time consuming, or in my case tamper your code to work with some additional assumptions that are not correct and you I will surelly come across as a problem in the future.</p>
Posted in .NET C#, SQL  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sarafianalex.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sarafianalex.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sarafianalex.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sarafianalex.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sarafianalex.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sarafianalex.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sarafianalex.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sarafianalex.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sarafianalex.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sarafianalex.wordpress.com/66/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sarafianalex.wordpress.com&blog=2367780&post=66&subd=sarafianalex&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://sarafianalex.wordpress.com/2009/05/12/microsoft-practices-enterpriselibrary-data-discoverparameters-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/64f00567ef7dda3ec36dcf0e01043d11?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sarafian</media:title>
		</media:content>
	</item>
		<item>
		<title>Enable / Disable Binding Validation</title>
		<link>http://sarafianalex.wordpress.com/2009/02/20/enable-disable-binding-validation/</link>
		<comments>http://sarafianalex.wordpress.com/2009/02/20/enable-disable-binding-validation/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 13:24:18 +0000</pubDate>
		<dc:creator>Sarafian Alex</dc:creator>
				<category><![CDATA[.NET C#]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://sarafianalex.wordpress.com/2009/02/20/enable-disable-binding-validation/</guid>
		<description><![CDATA[Today a came across a situation where I need to stop a binding from validating through the validation rules.
There is no easy way to do this. One should think that you can change the hole binding etc etc.
After doing a little snipping while in debug, I saw that the BindingExpression return from BindingExpression GetBindingExpression(DependencyPropertydp) holds [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sarafianalex.wordpress.com&blog=2367780&post=64&subd=sarafianalex&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p align="justify">Today a came across a situation where I need to stop a binding from validating through the validation rules.</p>
<p align="justify">There is no easy way to do this. One should think that you can change the hole binding etc etc.</p>
<p align="justify">After doing a little snipping while in debug, I saw that the <span style="color:#2b91af;">BindingExpression </span>return from <span style="color:#2b91af;">BindingExpression </span>GetBindingExpression(<span style="color:#2b91af;">DependencyProperty</span>dp) holds in the ParentBinding.ValidationRules the validation rules declared in xaml or not.</p>
<p align="justify">So I decided to create a <span style="color:#2b91af;">BaseValidationRule </span>from which all validation rules will subclass.</p>
<p align="justify"><span style="color:blue;">public abstract class</span><span style="color:#2b91af;">BaseValidationRule</span>:<span style="color:#2b91af;">ValidationRule     <br />&#160;&#160; </span>{    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color:blue;">protected </span>BaseValidationRule()    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; IsActive = <span style="color:blue;">true</span>;    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color:blue;">public bool </span>IsActive { <span style="color:blue;">get</span>; <span style="color:blue;">set</span>; }    </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color:blue;">protected abstract </span><span style="color:#2b91af;">ValidationResult </span>DoValidate(<span style="color:blue;">object</span>value,    <br /> System.Globalization.<span style="color:#2b91af;">CultureInfo</span>cultureInfo);    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color:blue;">public override</span><span style="color:#2b91af;">ValidationResult </span>Validate(<span style="color:blue;">object</span>value,     <br />System.Globalization.<span style="color:#2b91af;">CultureInfo </span>cultureInfo)    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color:blue;">if</span>(!IsActive)    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color:blue;">return</span><span style="color:#2b91af;">ValidationResult</span>.ValidResult;    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color:blue;">return </span>DoValidate(value, cultureInfo);    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }    <br />&#160;&#160;&#160; }</p>
<p align="justify">&#160;</p>
<p align="justify">As you can see if the rule is not active then it will simply return a <span style="color:#2b91af;">ValidationResult</span>.ValidResult so everything will be as though as you didn’t have validation rules in xaml.</p>
<p align="justify">I created some extention methods in order to quickly and transparently enable or disable validation rules at will.</p>
<p align="justify">Note that in order for the binding to be reevaluated based on the new status of your validation rules, you need to call UpdateSource on you <span style="color:#2b91af;">BindingExpression </span>.</p>
Posted in .NET C#, WPF  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sarafianalex.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sarafianalex.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sarafianalex.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sarafianalex.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sarafianalex.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sarafianalex.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sarafianalex.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sarafianalex.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sarafianalex.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sarafianalex.wordpress.com/64/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sarafianalex.wordpress.com&blog=2367780&post=64&subd=sarafianalex&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://sarafianalex.wordpress.com/2009/02/20/enable-disable-binding-validation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/64f00567ef7dda3ec36dcf0e01043d11?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sarafian</media:title>
		</media:content>
	</item>
		<item>
		<title>Serializing</title>
		<link>http://sarafianalex.wordpress.com/2009/02/02/serializing/</link>
		<comments>http://sarafianalex.wordpress.com/2009/02/02/serializing/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 08:43:37 +0000</pubDate>
		<dc:creator>Sarafian Alex</dc:creator>
				<category><![CDATA[.NET C#]]></category>

		<guid isPermaLink="false">http://sarafianalex.wordpress.com/2009/02/02/serializing/</guid>
		<description><![CDATA[I thought I understood fully serialization, but for some reason when building something for WWF I forgot a very important thing and a day was lost trying to find the cause of a mysterious problem.
The problem came because the workflow I persisted wouldn’t resume as I described here.
At the end, I found the problem and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sarafianalex.wordpress.com&blog=2367780&post=62&subd=sarafianalex&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p align="justify">I thought I understood fully serialization, but for some reason when building something for <a href="http://sarafianalex.wordpress.com/2009/02/02/persisted-worklow-wont-resume/">WWF</a> I forgot a very important thing and a day was lost trying to find the cause of a mysterious problem.</p>
<p align="justify">The problem came because the workflow I persisted wouldn’t resume as I described <a href="http://sarafianalex.wordpress.com/2009/02/02/persisted-worklow-wont-resume/">here</a>.</p>
<p align="justify">At the end, I found the problem and the exception was that for a type contained in my worflow the contructor could not be found. But I had spesifically declared a public contructor and marked is as Serializable.</p>
<p align="justify">I decided to debug in the native code which is not easy, and at some point I found where the exception about the constructor was througn.</p>
<p align="justify">RuntimeSerializer was requesting through reflection a constructor that took 2 type arguments. I wen’t back to my class declaration, which was a child of Dictionary&lt;,&gt;. I decided to look for a base contructor that took 2 arguments. I was going nuts, when I saw the constructor with these parameters    <br />(<span style="color:#2b91af;">SerializationInfo </span>info, <span style="color:#2b91af;">StreamingContext </span>context)</p>
<p align="justify">It all came clean to me then. Dictionary&lt;,&gt; implements ISerializable. This means that custom serialization is done when required. When serializing its ok, because <span style="color:#2b91af;">ISerializable.GetObjectData </span>is called. But when deserializing a specific constructor with the above signature was required that I had hidden because I didn’t specifically declare it in my class.</p>
<p align="justify">The whole mistake was really silly, I just wanted to emphasize on the caution that need to be taken when subclassing objects with <span style="color:#2b91af;">ISerializable</span>. </p>
<p align="justify">I would like to make a comment. Runtime serializer should through a more specific exception about the problem. It searched for a very specific constructor that can be easily forgoten when sublassing a class that implement <span style="color:#2b91af;">ISerializable</span></p>
<p> <a href="http://11011.net/software/vspaste"></a></p>
Posted in .NET C#  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sarafianalex.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sarafianalex.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sarafianalex.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sarafianalex.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sarafianalex.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sarafianalex.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sarafianalex.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sarafianalex.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sarafianalex.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sarafianalex.wordpress.com/62/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sarafianalex.wordpress.com&blog=2367780&post=62&subd=sarafianalex&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://sarafianalex.wordpress.com/2009/02/02/serializing/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/64f00567ef7dda3ec36dcf0e01043d11?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sarafian</media:title>
		</media:content>
	</item>
		<item>
		<title>Persisted Worklow won&#8217;t resume</title>
		<link>http://sarafianalex.wordpress.com/2009/02/02/persisted-worklow-wont-resume/</link>
		<comments>http://sarafianalex.wordpress.com/2009/02/02/persisted-worklow-wont-resume/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 08:29:40 +0000</pubDate>
		<dc:creator>Sarafian Alex</dc:creator>
				<category><![CDATA[.NET C#]]></category>
		<category><![CDATA[WWF]]></category>

		<guid isPermaLink="false">http://sarafianalex.wordpress.com/2009/02/02/persisted-worklow-wont-resume/</guid>
		<description><![CDATA[Lately I have been assigned to work with the Windows Workflow Foundation.
My feelings about it are mixed. There was a bug, that hold me for one day and I want to share with you, a troubleshooting technique that helped me.
First of all, out runtime service need to be persisted. In order to test persistance with [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sarafianalex.wordpress.com&blog=2367780&post=60&subd=sarafianalex&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p align="justify">Lately I have been assigned to work with the Windows Workflow Foundation.</p>
<p align="justify">My feelings about it are mixed. There was a bug, that hold me for one day and I want to share with you, a troubleshooting technique that helped me.</p>
<p align="justify">First of all, out runtime service need to be persisted. In order to test persistance with Workflow out of the box activities, just create a while (true) activitiy with a seqeunce activity with a delay and something that can be debugged. I have create a Debug Activity.</p>
<p align="justify">The runtime is initialized with an sql persistance service like this </p>
<pre class="code"><span style="color:#2b91af;">NameValueCollection </span>persistenceParams = <span style="color:blue;">new </span><span style="color:#2b91af;">NameValueCollection</span>();
persistenceParams.Add(<span style="color:#a31515;">&quot;ConnectionString&quot;</span>, ConnectionString);
persistenceParams.Add(<span style="color:#a31515;">&quot;UnloadOnIdle&quot;</span>, <span style="color:#2b91af;">Convert</span>.ToString(<span style="color:blue;">true</span>));
persistenceParams.Add(<span style="color:#a31515;">&quot;LoadIntervalSeconds&quot;</span>, <span style="color:#a31515;">&quot;5&quot;</span>);

<span style="color:blue;">this</span>.runtime.AddService(<span style="color:blue;">new </span><span style="color:#2b91af;">SqlWorkflowPersistenceService</span>(persistenceParams));</pre>
<pre class="code">Every time a delay or a timer is reached because of UnloadOnIdle, it will be persisted.</pre>
<pre class="code">My problem was that the workflow never resumed although, the entries in the database were correct.</pre>
<pre class="code">I monitored its flow, by capturing these events</pre>
<ul>
<li>
<pre class="code">WorkflowIdled</pre>
</li>
<li>
<pre class="code">WorkflowSuspended</pre>
</li>
<li>
<pre class="code">WorkflowUnloaded</pre>
</li>
<li>
<pre class="code">WorkflowPersisted</pre>
</li>
<li>
<pre class="code">WorkflowLoaded</pre>
</li>
</ul>
<p>But WorkflowLoaded never came through. The reason I know it should was because I was actually refactoring I knew the sequence of events that would be fired.</p>
<p>Finally, and after some time I decided to capture ServicesExceptionNotHandled event. It turns out that although you may have declared to capture all exceptions form Visual Studio (Ctrl+Alt+E), if you do not capture that event you will never know what’s wrong.</p>
<p>The event provides a <span style="color:#2b91af;">ServicesExceptionNotHandledEventArgs </span>that basically holds the exception of what wen’t wrong.</p>
<p>In my case the problem was with serialization. The actual problem I will discuss in my next <a href="http://sarafianalex.wordpress.com/2009/02/02/serializing/">post</a>.</p>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p><a href="http://11011.net/software/vspaste">&#160;</a></p>
Posted in .NET C#, WWF  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sarafianalex.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sarafianalex.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sarafianalex.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sarafianalex.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sarafianalex.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sarafianalex.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sarafianalex.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sarafianalex.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sarafianalex.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sarafianalex.wordpress.com/60/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sarafianalex.wordpress.com&blog=2367780&post=60&subd=sarafianalex&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://sarafianalex.wordpress.com/2009/02/02/persisted-worklow-wont-resume/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/64f00567ef7dda3ec36dcf0e01043d11?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sarafian</media:title>
		</media:content>
	</item>
		<item>
		<title>Self Issued X509 Certification Token</title>
		<link>http://sarafianalex.wordpress.com/2009/01/08/self-issued-x509-certification-token/</link>
		<comments>http://sarafianalex.wordpress.com/2009/01/08/self-issued-x509-certification-token/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 16:27:03 +0000</pubDate>
		<dc:creator>Sarafian Alex</dc:creator>
				<category><![CDATA[Certificate]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[WCF]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://sarafianalex.wordpress.com/2009/01/08/self-issued-x509-certification-token/</guid>
		<description><![CDATA[At the company I work for, there was a need to create a n-tier application with username authentication.
For some reason WCF requires a certificate which is understandable, but shouldn&#8217;t this be a choice of my company?I will not get deep with WCF about this part. Maybe in another section.
So what is the problem. The problem [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sarafianalex.wordpress.com&blog=2367780&post=53&subd=sarafianalex&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p align="justify">At the company I work for, there was a need to create a n-tier application with username authentication.</p>
<p align="justify">For some reason WCF requires a certificate which is understandable, but shouldn&#8217;t this be a choice of my company?I will not get deep with WCF about this part. Maybe in another section.</p>
<p align="justify">So what is the problem. The problem is that everyone talks about making a self issued certification token and using it to run in development, but few talk about deploying the application. And most of those few have posted questions that remain unanswered or have posted some guidelines that do not work entirely.</p>
<p align="justify">My development machine is Vista 32 based and target deployment was for both Vista 32 and Windows Server 2003 both environments under their respective IIS.</p>
<p align="justify">First of all, the token must be created. At start as many of you, I knew little about certificates. I really believe this not to be a common interest for developers, so it has been really annoying not to really understand what has been happening or why that command was user. It is fair to say that at the moment, I haven&#8217;t really understood why the solution works, probably because after not being able to find solutions for my problems I had to resort to trial and error. Additionally Microsoft does not make public a lot of information about the subject or relevant APIS and their errors. There are some tools for example that generate a very common error message that one can not track the reason causing it.</p>
<p align="justify">Certificates manager console will be required with knowledge of it for importing and exporting.</p>
<p align="justify">Anyway, lets start.</p>
<p align="justify">First I will discuss how to create a self issued token through the development token. To token is created for a WCF service and its store location will be LocalMachine and store name My. My post is not for WCF so I assume that one knows what the above means for WCF.</p>
<p align="justify">Then I will discuss how to setup IIS in the development machine.</p>
<p align="justify">Last in this post I will tell you how to reuse the above token in other machines.</p>
<h2 align="justify"></h2>
<h2 align="justify">Token Creation</h2>
<p align="justify">
<p align="justify">In order to create a self issued token, you must have installed in the machine Windows SDK. Because the machine is a development the above should be found in :\Program Files\Microsoft SDKs\Windows\v6.0A\Bin for Vista and XP and C:\Program Files\Microsoft Platform SDK\Bin for Windows 2003.If not found for windows 2003 you can download it from <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&amp;displaylang=en#filelist">here</a>. In any case WSDK will refer from now on to the appropriate path.</p>
<p align="justify">In order to create the token a certification authority token must be created first and then the token itself issued by the above. In order to keep it simple we assume that TokenCA is the certificate authority token and TokenCert is the certification token based on TokenCA.</p>
<p align="justify">In order for the above to work for wcf, the key must be exportable so in each command that it is required the appropriate flag is used. I will not analyze the commands, you can do it from the help or Internet.</p>
<p align="justify">The goal of the next steps is to create a zip file with the reusable token.All files will be saved in C:\ . Password will be required. I chose one and used it everywhere.</p>
<h3 align="justify">Create Certification Authority</h3>
<p align="justify">Open a command prompt for the WSDK path.</p>
<p align="justify">Execute makecert -n &#8220;CN=TokenCA&#8221; -r -sky exchange -pe -sv C:\TokenCA.pvk C:\TokenCA.cer</p>
<h3 align="justify">Create Certification Token</h3>
<p align="justify">Execute makecert -sk =TokenCert -iv C:\TokenCA.pvk -n &#8220;CN=TokenCert&#8221; -ic C:\TokenCA.cer -sky exchange -pe C:\TokenCert.cer -sr LocalMachine -ss My</p>
<h3 align="justify">Import Token</h3>
<p align="justify">In order to Import Token you must open the Certificates manager from the mmc.</p>
<p align="justify">In the Trusted Root Certification Authorities under certificated select import and choose the TokenCA.cer we created.</p>
<p align="justify">Then in the Personal under Certificated select import and choose TokenCert.cer.</p>
<p align="justify">At this stage the token is ready to be used by the development WCF Service.</p>
<h3 align="justify">Export Token</h3>
<p align="justify">In the Personal under Certificated select import and choose the token we created and select export. On the question if you want the export the private key, choose YES.</p>
<p align="justify"><a href="http://sarafianalex.files.wordpress.com/2009/01/image1.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="221" alt="image" src="http://sarafianalex.files.wordpress.com/2009/01/image-thumb.png?w=244&#038;h=221" width="244" border="0"></a> </p>
<p align="justify">Then select like the next picture </p>
<p align="justify"><a href="http://sarafianalex.files.wordpress.com/2009/01/image2.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="221" alt="image" src="http://sarafianalex.files.wordpress.com/2009/01/image-thumb1.png?w=244&#038;h=221" width="244" border="0"></a> </p>
<p align="justify">Then enter password, and select where it should be stored. I entered c:\Token.pfx.</p>
<p align="justify">At this stage in c:\ there should be 4 files starting with token which you can pack but the reusable part is the Token.pfx.</p>
<h2 align="justify">Deploying in another machine</h2>
<p align="justify">
<p align="justify">Now we want to use the above certificate. In the certificates manager in Certificates node under Personal you import the TokenCert.pfx enter the password and mark the key as exportable like this</p>
<p align="justify"><a href="http://sarafianalex.files.wordpress.com/2009/01/image.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="221" alt="image" src="http://sarafianalex.files.wordpress.com/2009/01/image-thumb2.png?w=244&#038;h=221" width="244" border="0"></a> </p>
<h2 align="justify">IIS Setup </h2>
<p align="justify">
<p align="justify">In order for any process to use the token we created or imported, that process must have read rights under the user it is running over the actual file windows created for the certificate token (TokenCert).</p>
<p align="justify">So for IIS NETWORK_SERVICE must have read access over the file.</p>
<p align="justify">If the OS is Windows 2003 you can use <a href="http://www.microsoft.com/downloads/thankyou.aspx?familyId=c42e27ac-3409-40e9-8667-c748e422833f&amp;displayLang=en">WinHttpCertCfg.exe</a> which has two problems. First it is deprecated for Vista and second most important it gives the user Full Control access. So I do not recommend it. In any case use it like this winhttpcertcfg -g -c LOCAL_MACHINE\My -s &#8220;TokenCert&#8221; -a &#8220;NETWORK SERVICE&#8221;</p>
<p align="justify">Windows itself want tell you the file itself. In order to locate it you must follow <a href="http://msdn.microsoft.com/en-us/library/aa717039.aspx">these</a> instructions.After you have located is just give the right like every other folder/file sharing.</p>
<p align="justify">Now the IIS can access the certificate. If you don&#8217;t do this the service will fail in every attempt including just hitting the svc which I used as a test.</p>
<p align="justify">In Vista there is another way through the certificates manager. You can select the certificate token (TokenCert) and right click -&gt; All Tasks -&gt; Manage Private Keys will display the access rights dialog for the actual file.</p>
<h2>Questions</h2>
<p align="justify">I can&#8217;t understand why in other machines the TokenCA is not needed. When I had also imported that, there were errors both from the finding tool and the winhttpcertcfg. This problem was resolved based truly on trial and error, but I still can&#8217;t understand why when creating the TokenCert, TokenCA is needed and then not. I know that the key is contained in the pfx, but as a mentioned my knowledge of certificates is superficial so the question still remains.</p>
<p align="justify">If I use the TokenCert outside the intranet will it still work?</p>
<h2>Future Stuff</h2>
<p>Because I want/ need automate the procedure, tools will be written to do the above in sequence. When I do, I surely post here or on codeproject.</p>
<h2>Conclusions</h2>
<p>Any questions you might have, please just ask and if I can help I will. The above process has taken me 2 days to find and I personally find it unacceptable especially when there is a WCF authorization system that requires the use of a token.</p>
<p>This article is based again on a specific WCF deployment that was required of me, but I think it is irrelevant.</p>
<p>Hope I didn&#8217;t forget anything.</p>
<p align="justify">Finally let me just say that the simplest and oldest authorization has been turned into a deployment nightmare. Hope this article helps the community. As always everything is great when Microsoft evangelist advertise. You guys, we are not making an assignment for IT bachelors.</p>
<p align="justify">
Posted in Certificate, IIS, WCF, Windows  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sarafianalex.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sarafianalex.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sarafianalex.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sarafianalex.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sarafianalex.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sarafianalex.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sarafianalex.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sarafianalex.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sarafianalex.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sarafianalex.wordpress.com/53/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sarafianalex.wordpress.com&blog=2367780&post=53&subd=sarafianalex&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://sarafianalex.wordpress.com/2009/01/08/self-issued-x509-certification-token/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/64f00567ef7dda3ec36dcf0e01043d11?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sarafian</media:title>
		</media:content>

		<media:content url="http://sarafianalex.files.wordpress.com/2009/01/image-thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://sarafianalex.files.wordpress.com/2009/01/image-thumb1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://sarafianalex.files.wordpress.com/2009/01/image-thumb2.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Programmatically managing IIS</title>
		<link>http://sarafianalex.wordpress.com/2008/11/27/programmatically-managing-iis/</link>
		<comments>http://sarafianalex.wordpress.com/2008/11/27/programmatically-managing-iis/#comments</comments>
		<pubDate>Thu, 27 Nov 2008 13:32:18 +0000</pubDate>
		<dc:creator>Sarafian Alex</dc:creator>
				<category><![CDATA[.NET C#]]></category>
		<category><![CDATA[IIS]]></category>

		<guid isPermaLink="false">http://sarafianalex.wordpress.com/2008/11/27/programmatically-managing-iis/</guid>
		<description><![CDATA[I wrote an article about managing IIS through code. In the attached file there is a library that will be extender with Active Directory Functionality and possibly Microsoft Exchange.
The article can be found here
Posted in .NET C#, IIS       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sarafianalex.wordpress.com&blog=2367780&post=47&subd=sarafianalex&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p align="justify">I wrote an article about managing IIS through code. In the attached file there is a library that will be extender with Active Directory Functionality and possibly Microsoft Exchange.</p>
<p align="justify">The article can be found <a href="http://www.codeproject.com/KB/server-management/DirectoryServicesIIS.aspx">here</a></p>
Posted in .NET C#, IIS  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sarafianalex.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sarafianalex.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sarafianalex.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sarafianalex.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sarafianalex.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sarafianalex.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sarafianalex.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sarafianalex.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sarafianalex.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sarafianalex.wordpress.com/47/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sarafianalex.wordpress.com&blog=2367780&post=47&subd=sarafianalex&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://sarafianalex.wordpress.com/2008/11/27/programmatically-managing-iis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/64f00567ef7dda3ec36dcf0e01043d11?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sarafian</media:title>
		</media:content>
	</item>
		<item>
		<title>WPF vs Windows Forms</title>
		<link>http://sarafianalex.wordpress.com/2008/11/25/wpf-vs-windows-forms/</link>
		<comments>http://sarafianalex.wordpress.com/2008/11/25/wpf-vs-windows-forms/#comments</comments>
		<pubDate>Tue, 25 Nov 2008 21:43:14 +0000</pubDate>
		<dc:creator>Sarafian Alex</dc:creator>
				<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://sarafianalex.wordpress.com/2008/11/25/wpf-vs-windows-forms/</guid>
		<description><![CDATA[Today I was at a DevDay in Athens, Greece with subject the 3 W of .NET 3 and 3.5. WPF, WCF and WWF.
First of all, I want to say that for one for time, it was just like reading glorious posts on the net about how easy stuff are with Microsoft technologies. Guys, business applications [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sarafianalex.wordpress.com&blog=2367780&post=45&subd=sarafianalex&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p align="justify">Today I was at a DevDay in Athens, Greece with subject the 3 W of .NET 3 and 3.5. WPF, WCF and WWF.</p>
<p align="justify">First of all, I want to say that for one for time, it was just like reading glorious posts on the net about how easy stuff are with Microsoft technologies. Guys, business applications are not a paper for a university lesson. Programmers in companies should not be carried away by tricks that show of, but not give a resolve issues that enterprise developers must solve.</p>
<p align="justify">Based on that, once again WCF was great. Hell its not because of reasons discussed&nbsp; <a href="http://sarafianalex.wordpress.com/2008/06/17/wcf-debuging/">here</a> and <a href="http://sarafianalex.wordpress.com/2008/06/28/how-to-debug-a-wcf-service/">here</a>. In the WWF, a colleague of mine asked a very logical question, but there was no answer either. I don&#8217;t know whether those presenting the technologies don&#8217;t have a deep understanding of the technologies discussed or they purpose is to market them.</p>
<p align="justify">In the subject that I understand best, that is WPF, I really must say that based on what was presented, no one would migrate to the technology. The speaker made the usual mistake of basing his presentation on the usual wrong stuff, Graphic, Animation Fantastic UI and the so called developer &#8211; designer better cooperation. But when a member of the audience asked the logical question, of why should I migrate,&nbsp; when all there are so huge differences and especially when a dedicated designer will be required still there was no clear answer to point out that true power of WPF.</p>
<p align="justify">So I will try to point out what are the overwhelming advantages of WPF and also point out some of the wrongs that I have found in the last six months.</p>
<p align="justify">Yes there is a tough learning curve, but the true power of WPF resides in the data binding mechanism and the way it shares resources across the application. On extra benefit that comes from the learning curve is that who learn how to decouple logic from UI. It&#8217;s not because of a pattern, but because of the data binding mechanism. Truly an application will last longer, when the UI can be changed without producing problems to the logic. Use the templates right and you can change a piece of UI code that reflects to the entire application. And don&#8217;t get me started about the usage of Control Templates.</p>
<p align="justify">Routed events are also great but the resource sharing is awesome. Just create a themed application in windows forms and compare the memory used by heavy brushes with a WPF themed application.</p>
<p align="justify">All the above comes with greatly improved performance, bonus from .NET 3.5 SP1.</p>
<p align="justify">My first problem with WPF and with Microsoft is the total disregard for Datasets and especially typed datasets. WPF will be on a client which if it is an enterprise application, it will require an application server. What better way to have related data transferred over the wire than from dataset? This is why I say that Microsoft has great ideas, but tends to forget the real needs of business. All examples are with simple objects which have set and get methods. But that is the simple way. That would be the solution for a university exercise because in real world you cant hit the application server continually, wcf or not.</p>
<p align="justify">Second problem with WPF is the Command mechanism that is used. Don&#8217;t get me wrong, the idea is great but why it must be static the Command instance? If I want to create the same form twice as non modal window, what will happen? It is not clear to me why they have chosen static for commands.</p>
<p align="justify">For the last six months I&#8217;ve been developing with colleagues a WPF application that can handle several modules not known at design time, and all these modules and the shell can must present themselves in various languages based on the installation. I really don&#8217;t know how some things could have been made with windows forms.</p>
<p align="justify">For me WPF and WCF are the most powerful add-ons in the .NET3 version and older. I just wish Microsoft would be a little more serious about the needs of true enterprise applications and not just glowingly showing little demos.</p>
Posted in WPF  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sarafianalex.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sarafianalex.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sarafianalex.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sarafianalex.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sarafianalex.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sarafianalex.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sarafianalex.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sarafianalex.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sarafianalex.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sarafianalex.wordpress.com/45/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sarafianalex.wordpress.com&blog=2367780&post=45&subd=sarafianalex&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://sarafianalex.wordpress.com/2008/11/25/wpf-vs-windows-forms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/64f00567ef7dda3ec36dcf0e01043d11?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sarafian</media:title>
		</media:content>
	</item>
	</channel>
</rss>