<?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>DevtheWeb.NET &#187; .NET</title>
	<atom:link href="http://www.devtheweb.net/blog/category/net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.devtheweb.net/blog</link>
	<description></description>
	<lastBuildDate>Tue, 06 Dec 2011 19:25:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Things you probably didn’t know about C# &#8211; Part 2</title>
		<link>http://www.devtheweb.net/blog/2010/03/04/things-you-probably-didnt-know-about-csharp-part-2/</link>
		<comments>http://www.devtheweb.net/blog/2010/03/04/things-you-probably-didnt-know-about-csharp-part-2/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 09:10:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.devtheweb.net/blog/?p=1140</guid>
		<description><![CDATA[After a post about Things you probably didn’t know about C#, here’s a new post from the series: 1. If you want to exit you app without calling any finalizers or finally blocks use: Environment.FailFast(); 2. Instead of sting filePath = directoryPath + &#8220;\&#8221; + filename; you can use: sting filePath = System.IO.Path.Combine(directoryPath, filename); 3. [...]]]></description>
			<content:encoded><![CDATA[<p>After a post about <a href="http://www.devtheweb.net/blog/2010/02/25/things-you-probably-didnt-know-about-csharp/" target="_blank">Things you probably didn’t know about C#</a>, here’s a new post from the series:</p>
<p>1. If you want to exit you app without calling any finalizers or finally blocks use:</p>
<p>Environment.FailFast();</p>
<p>2. Instead of</p>
<p>sting filePath = directoryPath + &#8220;\&#8221; + filename;</p>
<p>you can use:</p>
<p>sting filePath = System.IO.Path.Combine(directoryPath, filename);</p>
<div style="float:left; margin-right:5px;"><!--adsense--></div>
<p>3. Forget about &#8220;rn&#8221; for new line, you can use Environment.NewLine instead. It&#8217;s better because it&#8217;s system independent</p>
<p>4. You can create a typed reference from a variable:</p>
<p>int i = 100;</p>
<p>TypedReference typeRef = __makeref(i);</p>
<p>5. From the example above, you can extract the original type:</p>
<p>Type type = __reftype(typeRef);</p>
<p>6. You can extract the value from TypedReference:</p>
<p>int j = __refvalue(typeRef, int);</p>
<p>7. You can use the &#8216;@&#8217; character in the beginning of variable names. It&#8217;s suitable to be used for vars:</p>
<p>var @obj = new object();</p>
<p>8. If you want the garbage collector to collect some object while it can be accessed by the application, you can use the System.WeakReference class, you can read more about it <a href="http://msdn.microsoft.com/en-us/library/system.weakreference.aspx" target="_blank">HERE</a>.</p>
<p>P.S. I&#8217;ve test all the examples above under .NET Frawork 3.5.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devtheweb.net/blog/2010/03/04/things-you-probably-didnt-know-about-csharp-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Should you create separate file for new enum in .NET?</title>
		<link>http://www.devtheweb.net/blog/2010/02/20/should-you-create-separate-file-for-new-enum-in-dot-net/</link>
		<comments>http://www.devtheweb.net/blog/2010/02/20/should-you-create-separate-file-for-new-enum-in-dot-net/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 12:15:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[best practices]]></category>

		<guid isPermaLink="false">http://www.devtheweb.net/blog/?p=1032</guid>
		<description><![CDATA[You may become in the following situation: You have some class and you want to add some enum for it, then you begin wandering should you add a new file for the enum. I think if the enum will be used by a single class then you should add the enum declaration inside the class. [...]]]></description>
			<content:encoded><![CDATA[<p>You may become in the following situation: You have some class and you want to add some enum for it, then you begin wandering should you add a new file for the enum.</p>
<p>I think if the enum will be used by a single class then you should add the enum declaration inside the class. But if the enum is global and will be used by many classes you can create a new file where you can add declarations of all globally used enums. But to create separate files for all enums it too wasteful <img src='http://www.devtheweb.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.devtheweb.net/blog/2010/02/20/should-you-create-separate-file-for-new-enum-in-dot-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to declare and init a static Dictionary</title>
		<link>http://www.devtheweb.net/blog/2010/02/15/how-to-declare-and-init-a-static-dictionary/</link>
		<comments>http://www.devtheweb.net/blog/2010/02/15/how-to-declare-and-init-a-static-dictionary/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 09:14:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Dictionary]]></category>

		<guid isPermaLink="false">http://www.devtheweb.net/blog/?p=986</guid>
		<description><![CDATA[You may want to declare a static Dictionary variable in you code, here&#8217;s a simple example how it can be done in C#: using System.Collections.Generic; &#8230; public static Dictionary&#60;string, string&#62; dict = new Dictionary&#60;string, string&#62;() { {&#8220;key 1&#8243;, &#8220;value 1&#8243;}, {&#8220;key 2&#8243;, &#8220;value 2&#8243;}, {&#8220;key 3&#8243;, &#8220;value 3&#8243;} }; That&#8217;s all. It&#8217;s similar to the [...]]]></description>
			<content:encoded><![CDATA[<p>You may want to declare a static Dictionary variable in you code, here&#8217;s a simple example how it can be done in C#:</p>
<p><span style="color: #0000ff;">using</span> System.Collections.Generic;</p>
<p>&#8230;</p>
<p><span style="color: #0000ff;">public static</span> <span style="color: #33cccc;">Dictionary</span>&lt;<span style="color: #0000ff;">string</span>, <span style="color: #0000ff;">string</span>&gt; dict = <span style="color: #0000ff;">new </span><span style="color: #33cccc;">Dictionary</span>&lt;<span style="color: #0000ff;">string</span>, <span style="color: #0000ff;">string</span>&gt;() {<br />
{<span style="color: #800000;">&#8220;key 1&#8243;</span>, <span style="color: #800000;">&#8220;value 1&#8243;</span>},<br />
{<span style="color: #800000;">&#8220;key 2&#8243;</span>, <span style="color: #800000;">&#8220;value 2&#8243;</span>},<br />
{<span style="color: #800000;">&#8220;key 3&#8243;</span>, <span style="color: #800000;">&#8220;value 3&#8243;</span>}<br />
};</p>
<p>That&#8217;s all. It&#8217;s similar to the array declaration <img src='http://www.devtheweb.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.devtheweb.net/blog/2010/02/15/how-to-declare-and-init-a-static-dictionary/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My URL Pattern</title>
		<link>http://www.devtheweb.net/blog/2010/02/12/my-url-pattern/</link>
		<comments>http://www.devtheweb.net/blog/2010/02/12/my-url-pattern/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 08:51:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[pattern]]></category>

		<guid isPermaLink="false">http://www.devtheweb.net/blog/?p=933</guid>
		<description><![CDATA[I needed a url pattern that recognizes the following urls: http://site.com www.site.com https://site.com https://www.site.com Even more, I wanted after url detection, it to be replaced with: http://site.com -&#62; http://site.com www.site.com -&#62; http://www.site.com https://site.com -&#62; https://site.com https://www.site.com -&#62; https://www.site.com I use Regex&#8217;s Replace method. It detects all urls and replaces them with the correct format. Here [...]]]></description>
			<content:encoded><![CDATA[<p>I needed a url pattern that recognizes the following urls:</p>
<p>http://site.com</p>
<p>www.site.com</p>
<p>https://site.com</p>
<p>https://www.site.com</p>
<p>Even more, I wanted after url detection, it to be replaced with:</p>
<p>http://site.com -&gt; http://site.com</p>
<p>www.site.com -&gt; http://www.site.com</p>
<p>https://site.com -&gt; https://site.com</p>
<p>https://www.site.com -&gt; https://www.site.com</p>
<p>I use Regex&#8217;s Replace method. It detects all urls and replaces them with the correct format. Here is the full example:</p>
<p>string originalText;</p>
<p>&#8230;</p>
<p>string convertedText = Regex.Replace(originalText,<br />
@&#8221;((http(?&lt;http1&gt;(s?))://(?&lt;www1&gt;(www.)))|(http(?&lt;http2&gt;(s?))://)|((?&lt;www2&gt;(www.))))(?&lt;url&gt;([wd:#@%/;$()~_?+-=\.&amp;]*))&#8221;,<br />
@&#8221;http${http1}${http2}://${www1}${www2}${url}&#8221;);</p>
<p>&#8230;</p>
<p>P.S. I hope that the example above could be useful to someone else, too. If you find some bug or suggestion, I&#8217;ll be very thankful to hear how it can be fixed <img src='http://www.devtheweb.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.devtheweb.net/blog/2010/02/12/my-url-pattern/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Export data to docx file using Open XML SDK</title>
		<link>http://www.devtheweb.net/blog/2010/02/08/export-data-to-docx-file-using-open-xml-sdk/</link>
		<comments>http://www.devtheweb.net/blog/2010/02/08/export-data-to-docx-file-using-open-xml-sdk/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 10:46:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[OpenXML]]></category>

		<guid isPermaLink="false">http://www.devtheweb.net/blog/?p=913</guid>
		<description><![CDATA[Here&#8217;s simple example how can we export some table data to docx file using Open XML SDK. If you are not familiar with Open XML SDK, you can check out first Introduction to Open XML SDK. In this example: 1) Create some string array that represent table data 2) Create a new Docx file and [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s simple example how can we export some table data to docx file using Open XML SDK. If you are not familiar with Open XML SDK, you can check out first <a href="http://www.devtheweb.net/blog/2010/01/11/introduction-to-open-xml-sdk-2-0/" target="_blank">Introduction to Open XML SDK</a>.</p>
<p>In this example:<br />
1) Create some string array that represent table data<br />
2) Create a new Docx file and init it<br />
3) Create styles for the table and fill it with data<br />
4) Fill the table with data<br />
5) Add the table to the document and save the changes</p>
<p>//t some data to export in table<br />
string[][] data = {new string[]{&#8220;column 1&#8243;, &#8220;column 2&#8243;, &#8220;column 3&#8243;, &#8220;column 4&#8243;, &#8220;column 5&#8243;},<br />
new string[]{&#8220;A&#8221;, &#8220;B&#8221;, &#8220;C&#8221;, &#8220;D&#8221;, &#8220;E&#8221;},<br />
new string[]{&#8220;1&#8243;, &#8220;2&#8243;, &#8220;3&#8243;, &#8220;4&#8243;, &#8220;5&#8243;},<br />
new string[]{&#8220;Dev&#8221;, &#8220;The&#8221;, &#8220;Web&#8221;, &#8220;dot&#8221;, &#8220;NET&#8221;}<br />
};</p>
<p>/*t create and init a new docx file and<br />
a WordprocessingDocument object to represent it t*/<br />
WordprocessingDocument doc = WordprocessingDocument.Create(&#8220;E:\dox-export.docx&#8221;,<br />
WordprocessingDocumentType.Document);</p>
<p>MainDocumentPart mainDocPart = doc.AddMainDocumentPart();<br />
mainDocPart.Document = new Document();<br />
Body body = new Body();<br />
mainDocPart.Document.Append(body);</p>
<p>/*t init the cell border styles t*/<br />
TableCellProperties cellProperties = new TableCellProperties(<br />
new TableCellBorders<br />
{<br />
TopBorder = new TopBorder<br />
{<br />
Val = new EnumValue&lt;BorderValues&gt;(BorderValues.BasicBlackDots),<br />
Size = new UInt32Value((uint)8),<br />
Color = new StringValue(&#8220;000000&#8243;)<br />
},<br />
RightBorder = new RightBorder<br />
{<br />
Val = new EnumValue&lt;BorderValues&gt;(BorderValues.BasicBlackDots),<br />
Size = new UInt32Value((uint)8),<br />
Color = new StringValue(&#8220;000000&#8243;)<br />
},<br />
BottomBorder = new BottomBorder<br />
{<br />
Val = new EnumValue&lt;BorderValues&gt;(BorderValues.BasicBlackDots),<br />
Size = new UInt32Value((uint)8),<br />
Color = new StringValue(&#8220;000000&#8243;)<br />
},<br />
LeftBorder = new LeftBorder<br />
{<br />
Val = new EnumValue&lt;BorderValues&gt;(BorderValues.BasicBlackDots),<br />
Size = new UInt32Value((uint)8),<br />
Color = new StringValue(&#8220;000000&#8243;)<br />
},<br />
});</p>
<p>/*t fill the string[][] data into<br />
DocumentFormat.OpenXml.Wordprocessing.Table object t*/</p>
<p>Table table = new Table();<br />
for (int i = 0; i &lt; data.Length; ++i)<br />
{<br />
TableRow row = new TableRow();</p>
<p>for (int j = 0; j &lt; data[i].Length; ++j)<br />
{<br />
TableCell cell = new TableCell(cellProperties.Clone() as TableCellProperties);</p>
<p>cell.Append(new Paragraph(<br />
new Run(<br />
new Text(data[i][j])<br />
)));</p>
<p>row.Append(cell);<br />
}</p>
<p>table.Append(row);<br />
}</p>
<p>/*t add some info about the dox export t*/<br />
body.Append(new Paragraph(<br />
new Run(<br />
new Text(&#8220;Table exported by DevTheWeb.NET&#8221;)<br />
)));</p>
<p>body.Append(table);<br />
<!--adsense--><br />
/*t don&#8217;t forget to save your changes t*/<br />
doc.MainDocumentPart.Document.Save();<br />
doc.Dispose();</p>
<p>That&#8217;s all, if we open the dox file, we can see the exported table:<br />
<a href="http://www.devtheweb.net/blog/wp-content/uploads/2010/02/export-data-to-docx.png" rel="lightbox[913]"><img class="alignnone size-full wp-image-915" title="export-data-to-docx" src="http://www.devtheweb.net/blog/wp-content/uploads/2010/02/export-data-to-docx.png" alt="" width="400" height="402" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.devtheweb.net/blog/2010/02/08/export-data-to-docx-file-using-open-xml-sdk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introduction to Open XML SDK 2.0</title>
		<link>http://www.devtheweb.net/blog/2010/01/11/introduction-to-open-xml-sdk-2-0/</link>
		<comments>http://www.devtheweb.net/blog/2010/01/11/introduction-to-open-xml-sdk-2-0/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 08:22:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[OpenXML]]></category>

		<guid isPermaLink="false">http://www.devtheweb.net/blog/?p=493</guid>
		<description><![CDATA[Currently, I work with Open XML SDK 2.0 and in this post, I&#8217;ll try to explain simple introduction to it: What is Open XML and Open XML SDK? Open XML is an open standard that defines a set of XML schemas for representing spreadsheets, presentations, charts and word processing documents. Microsoft Office 2007 applications (Word, [...]]]></description>
			<content:encoded><![CDATA[<p>Currently, I work with Open XML SDK 2.0 and in this post, I&#8217;ll try to explain simple introduction to it:</p>
<p><strong>What is Open XML and Open XML SDK?</strong></p>
<p>Open XML is an open standard that defines a set of XML schemas for representing spreadsheets, presentations, charts and word processing documents. Microsoft Office 2007 applications (Word, Excel and PowerPoint) use the Open XML as the default file format. The Open XML file formats are based on ZIP and XML.</p>
<div><!--adsense--></div>
<p>The Open XML SDK 2.0 provides classes to manipulate Open XML documents. The Open XML SDK 2.0 uses the LINQ (Language-Integrated Query) technology to provide strongly typed object access to the XML content inside the parts of the Open XML documents.</p>
<p><strong>Download and Install<br />
</strong><br />
You can download Open XML SDK 2.0 <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=C6E744E5-36E9-45F5-8D8C-331DF206E0D0&amp;displaylang=en" target="_blank">HERE</a>.</p>
<p>System Requirements:</p>
<ul>
<li>OS: Windows 7; Windows Server 2003 SP 2; Windows Server 2008 R2; Windows Server 2008 SP 2; Windows Vista SP 2; Windows XP SP 3</li>
<li>.NET Framework version 3.5 SP1</li>
<li>At least 300 MB available disk space</li>
</ul>
<p><strong>Using the Open XML API 2.0 in Visual Studio 2008 Project</strong></p>
<p>To use the API in your Visual Studio project, all you need to do is to add Reference to DocumentFormat.OpenXml:</p>
<p>In Solution Explorer, right-click References and select Add Reference.</p>
<p>In the dialog box, select .NET tab and select DocumentFormat.OpenXml option and then click OK.</p>
<p><a href="http://www.devtheweb.net/blog/wp-content/uploads/2010/01/add-openxml-reference.png" rel="lightbox[493]"><img class="alignnone size-full wp-image-495" title="add-openxml-reference" src="http://www.devtheweb.net/blog/wp-content/uploads/2010/01/add-openxml-reference.png" alt="" width="416" height="352" /></a></p>
<p><strong>Read Docx&#8217;s Text</strong></p>
<p>It&#8217;s very easy to read the text of Word 2007 Document file, here&#8217;s an example:</p>
<p>using System.IO;<br />
using DocumentFormat.OpenXml;<br />
using DocumentFormat.OpenXml.Packaging;</p>
<p>//t local variables<br />
WordprocessingDocument doc;<br />
string result = &#8220;&#8221;;</p>
<p>try<br />
{<br />
//t load the .docx document<br />
doc = WordprocessingDocument.Open(stringForFilePath, false);</p>
<p>result = (doc.MainDocumentPart.Document).Body.InnerText;<br />
}<br />
catch (Exception ex)<br />
{<br />
//t handle the exception<br />
}</p>
<p>return result;</p>
<p><strong>Conclusion</strong><br />
At first look it seems to be easy to work with the Open XML 2.0 SDK, it&#8217;s easy to install use in Visual Studio 2008. I created a simple program that loads text from docx file:<br />
<a href="http://www.devtheweb.net/blog/wp-content/uploads/2010/01/openxml-sdk-introduction.png" rel="lightbox[493]"><img class="alignnone size-full wp-image-537" title="openxml-sdk-introduction" src="http://www.devtheweb.net/blog/wp-content/uploads/2010/01/openxml-sdk-introduction.png" alt="" width="400" height="270" /></a></p>
<p>You can download it <a href="http://www.devtheweb.net/downloads/TestOpenXmlSdk.rar">HERE</a>.</p>
<form id="formPoll" method="post" action="http://www.devtheweb.net/polls/poll-do-you-find-microsoft-openxml-sdk-useful.aspx?embed=true#vote">
<p><strong>Do you find Microsoft OpenXML SDK useful?</strong></p>
<div>&nbsp;</div>
<div>
<input value="option1" id="option1" type="radio" name="poll" /><label for="option1">Yes, it&#8217;s great</label></div>
<div>
<input value="option2" id="option2" type="radio" name="poll" /><label for="option2">Maybe</label></div>
<div>
<input value="option3" id="option3" type="radio" name="poll" /><label for="option3">No, total waste of time</label></div>
<div>
<input value="option4" id="option4" type="radio" name="poll" /><label for="option4">I don&#8217;t know</label></div>
<div>&nbsp;</div>
<div>
<input type="submit" value="VOTE" onclick="this.form.target='_blank';return true;" /></div>
<div>&nbsp;</div>
<p><a href="http://www.devtheweb.net/polls/poll-do-you-find-microsoft-openxml-sdk-useful.aspx#results" target="_blank">View Results</a></p>
</form>
]]></content:encoded>
			<wfw:commentRss>http://www.devtheweb.net/blog/2010/01/11/introduction-to-open-xml-sdk-2-0/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>WCF Web Services vs. Standard Web Services</title>
		<link>http://www.devtheweb.net/blog/2010/01/07/wcf-web-services-vs-standard-web-services/</link>
		<comments>http://www.devtheweb.net/blog/2010/01/07/wcf-web-services-vs-standard-web-services/#comments</comments>
		<pubDate>Thu, 07 Jan 2010 09:27:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[WCF]]></category>

		<guid isPermaLink="false">http://www.devtheweb.net/blog/?p=438</guid>
		<description><![CDATA[If you have experience with the standard .net web services you may find useful the following table of comparison between WCF Web Services and Standard Web Services. Standard Web Services WCF Web Services client for the service are generated by command-line tool WSDL.EXE ServiceMetadata tool(svcutil.exe) class attribute [WebService] [ServiceContract] method exposed to client attribute [WebMethod] [...]]]></description>
			<content:encoded><![CDATA[<p>If you have experience with the standard .net web services you</p>
<div style="float: left; padding-right: 5px;"><!--adsense--></div>
<p>may find useful the following table of comparison between WCF Web Services and Standard Web Services.</p>
<table border="1" width="100%" align="center">
<tbody>
<tr>
<th scope="col"></th>
<th scope="col">Standard Web Services</th>
<th scope="col">WCF Web Services</th>
</tr>
<tr>
<td>client for the service are generated by</td>
<td>command-line tool WSDL.EXE</td>
<td>ServiceMetadata tool(svcutil.exe)</td>
</tr>
<tr>
<td>class attribute</td>
<td>[WebService]</td>
<td>[ServiceContract]</td>
</tr>
<tr>
<td>method exposed to client attribute</td>
<td>[WebMethod]</td>
<td>[OperationContract]</td>
</tr>
<tr>
<td>supported operations</td>
<td>one-way</p>
<p>request-response</td>
<td>one-way,</p>
<p>request-response,</p>
<p>duplex</td>
</tr>
<tr>
<td>namespace for serialization</td>
<td>System.Xml.Serialization</td>
<td>System.Runtime.Serialization</td>
</tr>
<tr>
<td>Encoding</td>
<td>XML 1.0</p>
<p>MTOM</p>
<p>DIME</p>
<p>Custom</td>
<td>XML 1.0</p>
<p>MTOM</p>
<p>Binary</p>
<p>Custom</td>
</tr>
<tr>
<td>accessed through</td>
<td>HTTP,</p>
<p>TCP,</p>
<p>Custom</td>
<td>HTTP</p>
<p>TCP</p>
<p>Named pipes</p>
<p>MSMQ</p>
<p>P2P</p>
<p>Custom</td>
</tr>
<tr>
<td>Exception Handling</td>
<td>Unhandled exceptions are returned to the client as SOAP faults.</td>
<td>unhandled exceptions are returned to the client.</td>
</tr>
<tr>
<td>protocols</td>
<td>security</td>
<td>security</p>
<p>transaction</p>
<p>reliable messaging</td>
</tr>
<tr>
<td>can be hosted in</td>
<td>IIS</td>
<td>IIS</p>
<p>windows activation service</p>
<p>Windows service</p>
<p>Self-hosting</td>
</tr>
</tbody>
</table>
<p><!--adsense#banner--><br />
It seems that WCF offers much more portability and flexibility to develop a service when comparing to web service.</p>
<form id="formPoll" action="http://www.devtheweb.net/polls/poll-when-you-need-to-write-web-service--what-do-you-prefer-to-use.aspx?embed=true#vote" method="post"> <strong>When you need to write web service, what do you prefer to use?</strong></p>
<div></div>
<div>
<input id="option1" name="poll" type="radio" value="option1" /><label for="option1">Standard Web Services</label></div>
<div>
<input id="option2" name="poll" type="radio" value="option2" /><label for="option2">WCF Web Services</label></div>
<div></div>
<div>
<input onclick="this.form.target='_blank';return true;" type="submit" value="VOTE" /></div>
<div></div>
<div><a href="http://www.devtheweb.net/polls/poll-when-you-need-to-write-web-service--what-do-you-prefer-to-use.aspx#results" target="_blank">View Results</a></div>
</form>
]]></content:encoded>
			<wfw:commentRss>http://www.devtheweb.net/blog/2010/01/07/wcf-web-services-vs-standard-web-services/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>.NET Version Penetration</title>
		<link>http://www.devtheweb.net/blog/2010/01/01/net-version-penetration/</link>
		<comments>http://www.devtheweb.net/blog/2010/01/01/net-version-penetration/#comments</comments>
		<pubDate>Fri, 01 Jan 2010 11:32:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>

		<guid isPermaLink="false">http://www.devtheweb.net/blog/?p=348</guid>
		<description><![CDATA[If you develop a .NET application it&#8217;s a good idea to know how many people have Microsoft .NET Framework installed on their PCs. I found poor information about .NET version penetration, but This post helped me a lot. March 2008 June 2009 August 2009 October 2009 Dot Nothing 28.12% 25.6% 25.53% 21.4% .NET 1.0 2.59% [...]]]></description>
			<content:encoded><![CDATA[<p>If you develop a .NET application it&#8217;s a good idea to know how many people have Microsoft .NET Framework installed on their PCs.<br />
<!--adsense--><br />
I found poor information about .NET version penetration, but <a href="http://www.centralquestion.com/archives/2009/10/net_penetration_by_version.html" target="_blank">This post</a> helped me a lot.</p>
<table border="1">
<tbody>
<tr>
<td></td>
<td>March 2008</td>
<td>June 2009</td>
<td>August 2009</td>
<td>October 2009</td>
</tr>
<tr>
<td>Dot Nothing</td>
<td>28.12%</td>
<td>25.6%</td>
<td>25.53%</td>
<td>21.4%</td>
</tr>
<tr>
<td>.NET 1.0</td>
<td>2.59%</td>
<td>0.6%</td>
<td>0.4%</td>
<td>0.3%</td>
</tr>
<tr>
<td>.NET 1.1</td>
<td>23.22%</td>
<td>13.0%</td>
<td>8.41%</td>
<td>7.7%</td>
</tr>
<tr>
<td>.NET 2.0</td>
<td>27.41%</td>
<td>23.2%</td>
<td>23.02%</td>
<td>11.6%</td>
</tr>
<tr>
<td>.NET 3.0</td>
<td>17.67%</td>
<td>14.4%</td>
<td>10.01%</td>
<td>6.3%</td>
</tr>
<tr>
<td>.NET 3.5</td>
<td>0.99%</td>
<td>21.82%</td>
<td>32.63%</td>
<td>52.7%</td>
</tr>
</tbody>
</table>
<p>The bad news is that only 52.7% of the users has .NET Framework 3.5 installed on their PCs, but as you can see from the table they become more and more very fast <img src='http://www.devtheweb.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
<!--adsense--><br />
P.S. The latest information about .NET version penetration was for October 2009, if you found newer I&#8217;ll be very thankful to post a link to it as a comment and I&#8217;ll update the table above.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devtheweb.net/blog/2010/01/01/net-version-penetration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

