<?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>Code Support</title>
	<atom:link href="http://codesupport.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://codesupport.wordpress.com</link>
	<description></description>
	<lastBuildDate>Mon, 09 Jan 2012 09:46:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='codesupport.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/a756af2545880799e220afedc11cccd0?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Code Support</title>
		<link>http://codesupport.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://codesupport.wordpress.com/osd.xml" title="Code Support" />
	<atom:link rel='hub' href='http://codesupport.wordpress.com/?pushpress=hub'/>
		<item>
		<title>ASP.NET MVC2 Basics and Introduction</title>
		<link>http://codesupport.wordpress.com/2011/09/30/asp-net-mvc2-basics-and-introduction/</link>
		<comments>http://codesupport.wordpress.com/2011/09/30/asp-net-mvc2-basics-and-introduction/#comments</comments>
		<pubDate>Fri, 30 Sep 2011 04:00:37 +0000</pubDate>
		<dc:creator>Balaji Baskar</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[MVC2]]></category>

		<guid isPermaLink="false">http://codesupport.wordpress.com/?p=159</guid>
		<description><![CDATA[A very nice video on ASP.NET MVC2 by &#8220;Scott Hanselman&#8221;, covers the introduction and basics and gives a very clear understanding about this pattern. Filed under: ASP.NET, C# Tagged: ASP.NET, C#, MVC, MVC2<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codesupport.wordpress.com&amp;blog=3786821&amp;post=159&amp;subd=codesupport&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A very nice video on ASP.NET MVC2 by &#8220;Scott Hanselman&#8221;, covers the introduction and basics and gives a very clear understanding about this pattern.</p>
<div class='embed-vimeo' style='text-align:center;'><iframe src='http://player.vimeo.com/video/29818957' width='400' height='300' frameborder='0'></iframe></div>
<br />Filed under: <a href='http://codesupport.wordpress.com/category/asp-net/'>ASP.NET</a>, <a href='http://codesupport.wordpress.com/category/c/'>C#</a> Tagged: <a href='http://codesupport.wordpress.com/tag/asp-net/'>ASP.NET</a>, <a href='http://codesupport.wordpress.com/tag/c/'>C#</a>, <a href='http://codesupport.wordpress.com/tag/mvc/'>MVC</a>, <a href='http://codesupport.wordpress.com/tag/mvc2/'>MVC2</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codesupport.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codesupport.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codesupport.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codesupport.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codesupport.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codesupport.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codesupport.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codesupport.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codesupport.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codesupport.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codesupport.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codesupport.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codesupport.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codesupport.wordpress.com/159/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codesupport.wordpress.com&amp;blog=3786821&amp;post=159&amp;subd=codesupport&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://codesupport.wordpress.com/2011/09/30/asp-net-mvc2-basics-and-introduction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>41.470000 -81.512000</georss:point>
		<geo:lat>41.470000</geo:lat>
		<geo:long>-81.512000</geo:long>
		<media:content url="http://1.gravatar.com/avatar/fdf00825cf9b71df2f82c90a4c7022ae?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">BALU</media:title>
		</media:content>
	</item>
		<item>
		<title>Microsoft® Community Contributor Award</title>
		<link>http://codesupport.wordpress.com/2011/08/18/award/</link>
		<comments>http://codesupport.wordpress.com/2011/08/18/award/#comments</comments>
		<pubDate>Thu, 18 Aug 2011 09:56:54 +0000</pubDate>
		<dc:creator>Balaji Baskar</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[MCC]]></category>
		<category><![CDATA[Microsoft®]]></category>
		<category><![CDATA[Microsoft® Community Contributor Award]]></category>

		<guid isPermaLink="false">http://codesupport.wordpress.com/?p=154</guid>
		<description><![CDATA[Today was the most surprising day, it all happened when I opened my inbox to find this email from Microsoft that informed me being Microsoft Community Contributor Award recipient. This is a proud moment and was rather a great feel to get this recognition from Microsoft. Very encouraging for me for all the participation. If [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codesupport.wordpress.com&amp;blog=3786821&amp;post=154&amp;subd=codesupport&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://codesupport.files.wordpress.com/2011/08/mcc11_logo_vertical_full-color.jpg"><img class="size-thumbnail wp-image-155 alignleft" style="border-color:initial;border-style:initial;" title="MCC11_Logo_Vertical_Full-color" src="http://codesupport.files.wordpress.com/2011/08/mcc11_logo_vertical_full-color.jpg?w=150&#038;h=146" alt="Microsoft Community Contributor Award" width="150" height="146" /></a></p>
<p>Today was the most surprising day, it all happened when I opened my inbox to find this email from Microsoft that informed me being Microsoft Community Contributor Award recipient. This is a proud moment and was rather a great feel to get this recognition from Microsoft. Very encouraging for me for all the participation. If you would like to know more about this award, please follow this <a title="Microsoft® Community Contributor Award" href="https://www.microsoftcommunitycontributor.com/faq.aspx" target="_blank">link</a>.</p>
<br />Filed under: <a href='http://codesupport.wordpress.com/category/personal/'>Personal</a> Tagged: <a href='http://codesupport.wordpress.com/tag/mcc/'>MCC</a>, <a href='http://codesupport.wordpress.com/tag/microsoft%c2%ae/'>Microsoft®</a>, <a href='http://codesupport.wordpress.com/tag/microsoft%c2%ae-community-contributor-award/'>Microsoft® Community Contributor Award</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codesupport.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codesupport.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codesupport.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codesupport.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codesupport.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codesupport.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codesupport.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codesupport.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codesupport.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codesupport.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codesupport.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codesupport.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codesupport.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codesupport.wordpress.com/154/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codesupport.wordpress.com&amp;blog=3786821&amp;post=154&amp;subd=codesupport&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://codesupport.wordpress.com/2011/08/18/award/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>35.044977 -85.316207</georss:point>
		<geo:lat>35.044977</geo:lat>
		<geo:long>-85.316207</geo:long>
		<media:content url="http://1.gravatar.com/avatar/fdf00825cf9b71df2f82c90a4c7022ae?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">BALU</media:title>
		</media:content>

		<media:content url="http://codesupport.files.wordpress.com/2011/08/mcc11_logo_vertical_full-color.jpg?w=150" medium="image">
			<media:title type="html">MCC11_Logo_Vertical_Full-color</media:title>
		</media:content>
	</item>
		<item>
		<title>What is the difference between Uri and UriBuilder?</title>
		<link>http://codesupport.wordpress.com/2011/07/12/uri/</link>
		<comments>http://codesupport.wordpress.com/2011/07/12/uri/#comments</comments>
		<pubDate>Tue, 12 Jul 2011 15:09:04 +0000</pubDate>
		<dc:creator>Balaji Baskar</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[C Sharp]]></category>
		<category><![CDATA[String]]></category>
		<category><![CDATA[StringBuilder]]></category>
		<category><![CDATA[Uri]]></category>
		<category><![CDATA[UriBuilder]]></category>

		<guid isPermaLink="false">http://codesupport.wordpress.com/?p=151</guid>
		<description><![CDATA[The answer for this question would be similar to the question below: What is the difference between String and StringBuilder? Why? because they are similar in concept. A Uri/String is immutable (read-only, if you will). A UriBuilder/StringBuilder provides a mechanish to modify the contents of a Uri/String without having to destroy and recreate a Uri/String [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codesupport.wordpress.com&amp;blog=3786821&amp;post=151&amp;subd=codesupport&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The answer for this question would be similar to the question below:</p>
<p><em>What is the difference between String and StringBuilder?</em></p>
<p>Why? because they are similar in concept. A Uri/String is immutable (read-only, if you will). A UriBuilder/StringBuilder provides a mechanish to modify the contents of a Uri/String without having to destroy and recreate a Uri/String each time (which, if done often enough, could hurt performance).</p>
<p><pre class="brush: csharp;">
String scheme = &quot;http&quot;;
String target = &quot;balaji.com&quot;;
int port = 8080;
String path = sample/page1.aspx&quot;;
String query = &quot;?query=search text&quot;;
UriBuilder u = new UriBuilder(scheme, target, port, path, query);
</pre></p>
<br />Filed under: <a href='http://codesupport.wordpress.com/category/c/'>C#</a> Tagged: <a href='http://codesupport.wordpress.com/tag/c-sharp/'>C Sharp</a>, <a href='http://codesupport.wordpress.com/tag/c/'>C#</a>, <a href='http://codesupport.wordpress.com/tag/string/'>String</a>, <a href='http://codesupport.wordpress.com/tag/stringbuilder/'>StringBuilder</a>, <a href='http://codesupport.wordpress.com/tag/uri/'>Uri</a>, <a href='http://codesupport.wordpress.com/tag/uribuilder/'>UriBuilder</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codesupport.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codesupport.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codesupport.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codesupport.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codesupport.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codesupport.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codesupport.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codesupport.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codesupport.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codesupport.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codesupport.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codesupport.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codesupport.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codesupport.wordpress.com/151/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codesupport.wordpress.com&amp;blog=3786821&amp;post=151&amp;subd=codesupport&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://codesupport.wordpress.com/2011/07/12/uri/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>35.044977 -85.316207</georss:point>
		<geo:lat>35.044977</geo:lat>
		<geo:long>-85.316207</geo:long>
		<media:content url="http://1.gravatar.com/avatar/fdf00825cf9b71df2f82c90a4c7022ae?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">BALU</media:title>
		</media:content>
	</item>
		<item>
		<title>rsAccessedDenied &#8211; SQL Server 2008 R2 &#8211; Reporting Services</title>
		<link>http://codesupport.wordpress.com/2011/07/07/rsaccesseddenied/</link>
		<comments>http://codesupport.wordpress.com/2011/07/07/rsaccesseddenied/#comments</comments>
		<pubDate>Fri, 08 Jul 2011 03:59:03 +0000</pubDate>
		<dc:creator>Balaji Baskar</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[SSRS]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[Reporting Services]]></category>
		<category><![CDATA[rsAccessedDenied]]></category>
		<category><![CDATA[SQL Server 2008 R2]]></category>

		<guid isPermaLink="false">http://codesupport.wordpress.com/?p=147</guid>
		<description><![CDATA[Recently I installed SQL Server 2008 R2 in my Laptop and I was in a process of configuring SSRS using &#8220;Reporting Services Configuration Manager&#8221;. Therefore I went to the following URLs: Report Server: http://localhost/ReportServer Report Manager: http://localhost/Reports/Pages/Folder.aspx The page took more time to load, however gave me the following error even thou I was sure [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codesupport.wordpress.com&amp;blog=3786821&amp;post=147&amp;subd=codesupport&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Recently I installed SQL Server 2008 R2 in my Laptop and I was in a process of configuring SSRS using &#8220;Reporting Services Configuration Manager&#8221;. Therefore I went to the following URLs:</p>
<p>Report Server: <a href="http://localhost/ReportServer">http://localhost/ReportServer</a><br />
Report Manager: <a href="http://localhost/Reports/Pages/Folder.aspx">http://localhost/Reports/Pages/Folder.aspx</a></p>
<p>The page took more time to load, however gave me the following error even thou I was sure that I gave windows authentication for security during installation.</p>
<p><span style="color:#ff0000;">Microsoft.ReportingServices.Diagnostics.Utilities.ErrorStrings</span><br />
<span style="color:#ff0000;">The permissions granted to user &#8216;mydomain\myAccount&#8217; are insufficient for performing this operation. (rsAccessDenied) (ReportingServicesLibrary)</span></p>
<p>After a long research, I finally discovered that you have to open Internet Explorer in administrator mode (Right-Click and Open as Administrator) and try navigating to the above URLs. This is because initially the SSRS will have the following group &#8220;BUILTIN\Administrators&#8221; as &#8220;System Administrator&#8221; and you have to explicitly open as administrator when using Internet Explorer.</p>
<p>You will discover that this time you are able to load the pages and the first thing for me to do was to click on the &#8220;Site Settings&#8221; and under the Security option added my username as &#8220;System Administrator&#8221; under &#8220;New Role Assignment&#8221;.</p>
<p>After this done, you will notice that you can open up the Report Server / Manager URL&#8217;s under normal mode (without opening it as Administrator)</p>
<p>More Info from MSDN: <a href="http://msdn.microsoft.com/en-us/library/aa337279.aspx">http://msdn.microsoft.com/en-us/library/aa337279.aspx</a></p>
<p>Hope this is of help to somebody who is caught up with this issue.</p>
<br />Filed under: <a href='http://codesupport.wordpress.com/category/database/'>Database</a>, <a href='http://codesupport.wordpress.com/category/ssrs/'>SSRS</a> Tagged: <a href='http://codesupport.wordpress.com/tag/internet-explorer/'>Internet Explorer</a>, <a href='http://codesupport.wordpress.com/tag/reporting-services/'>Reporting Services</a>, <a href='http://codesupport.wordpress.com/tag/rsaccesseddenied/'>rsAccessedDenied</a>, <a href='http://codesupport.wordpress.com/tag/sql-server-2008-r2/'>SQL Server 2008 R2</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codesupport.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codesupport.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codesupport.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codesupport.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codesupport.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codesupport.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codesupport.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codesupport.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codesupport.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codesupport.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codesupport.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codesupport.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codesupport.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codesupport.wordpress.com/147/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codesupport.wordpress.com&amp;blog=3786821&amp;post=147&amp;subd=codesupport&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://codesupport.wordpress.com/2011/07/07/rsaccesseddenied/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<georss:point>35.044977 -85.316207</georss:point>
		<geo:lat>35.044977</geo:lat>
		<geo:long>-85.316207</geo:long>
		<media:content url="http://1.gravatar.com/avatar/fdf00825cf9b71df2f82c90a4c7022ae?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">BALU</media:title>
		</media:content>
	</item>
		<item>
		<title>Resurrecting CAPTCHA</title>
		<link>http://codesupport.wordpress.com/2011/06/24/captcha/</link>
		<comments>http://codesupport.wordpress.com/2011/06/24/captcha/#comments</comments>
		<pubDate>Fri, 24 Jun 2011 21:37:30 +0000</pubDate>
		<dc:creator>Balaji Baskar</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://codesupport.wordpress.com/?p=127</guid>
		<description><![CDATA[CAPTCHA, which stands for &#8220;Completely Automated Public Turing test to tell Computers and Humans Apart&#8221; is a challenge-response test used to determine and differentiate between a human and computer. Do you know? CAPTCHA considers the human to be a hero, while computers to be a villain even thou it’s the human who drives the computer [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codesupport.wordpress.com&amp;blog=3786821&amp;post=127&amp;subd=codesupport&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>CAPTCHA, which stands for &#8220;Completely Automated Public Turing test to tell Computers and Humans Apart&#8221; is a challenge-response test used to determine and differentiate between a human and computer.</p>
<p>Do you know?<br />
CAPTCHA considers the human to be a hero, while computers to be a villain even thou it’s the human who drives the computer to do all evil stuff and the computer finally takes the blame! I hope with the advancement of “Artificial Intelligence”, computers one day can sue for this discrimination. Anyway the real definition could be, “Process of determining good guys from bad guys.”</p>
<p>CAPTCHA has grown over the years with all the experience having dealt with SPAM attacks and HACKS. However what I have found recently encouraged to write this blog, have a look at this image below:</p>
<p><a href="http://codesupport.files.wordpress.com/2011/06/abnormalcaptcha.png"><img class="alignnone size-medium wp-image-128" title="abnormalCaptcha" src="http://codesupport.files.wordpress.com/2011/06/abnormalcaptcha.png?w=300&#038;h=99" alt="" width="300" height="99" /></a></p>
<p>This CAPTCHA is meaningless and I myself don&#8217;t know how to pass this challenge! Even thou I can refresh and get a new CAPTCHA I was concerned about the users with disability and how tough and annoying it would be for them.</p>
<p>Arguably thou the need for CAPTCHA has to be much complex these days, this kind of complexity would prove worthless and thats when I thought, why not CAPTCHA implement this? Have a look at the image below:</p>
<p><a href="http://codesupport.files.wordpress.com/2011/06/normalcaptcha.png"><img class="alignnone size-medium wp-image-129" title="normalCaptcha" src="http://codesupport.files.wordpress.com/2011/06/normalcaptcha.png?w=300&#038;h=99" alt="" width="300" height="99" /></a></p>
<p>For most of the readers you might not understand what this means &#8221;அம்மா அப்பா&#8221;, but this is written in Tamil language which means &#8220;mother father&#8221;. I guess you should have got the point already now. In todays world every user is tied to atleast one registration process, could be an open id or from any other services like facebook, google, yahoo, etc. During the registration, information like country / language are captured from the user. The system could use this information and offer challenges based on the user&#8217;s language (during registration), a sample question could be:</p>
<p>Translate &#8220;அம்மா&#8221; in English.</p>
<p>This way you will be reducing attacks enormously. Remember if it was english language alone, then maintaining one dictionary for english would be more than enought to compromise the CAPTCHA system.</p>
<p>Thou this implementation offers primarily one challenge which is to support the script for a given language, on the other hand this could be a first level filter / test that would be even more challenging.</p>
<br />Filed under: <a href='http://codesupport.wordpress.com/category/uncategorized/'>Uncategorized</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codesupport.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codesupport.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codesupport.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codesupport.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codesupport.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codesupport.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codesupport.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codesupport.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codesupport.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codesupport.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codesupport.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codesupport.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codesupport.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codesupport.wordpress.com/127/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codesupport.wordpress.com&amp;blog=3786821&amp;post=127&amp;subd=codesupport&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://codesupport.wordpress.com/2011/06/24/captcha/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<georss:point>35.044977 -85.316207</georss:point>
		<geo:lat>35.044977</geo:lat>
		<geo:long>-85.316207</geo:long>
		<media:content url="http://1.gravatar.com/avatar/fdf00825cf9b71df2f82c90a4c7022ae?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">BALU</media:title>
		</media:content>

		<media:content url="http://codesupport.files.wordpress.com/2011/06/abnormalcaptcha.png?w=300" medium="image">
			<media:title type="html">abnormalCaptcha</media:title>
		</media:content>

		<media:content url="http://codesupport.files.wordpress.com/2011/06/normalcaptcha.png?w=300" medium="image">
			<media:title type="html">normalCaptcha</media:title>
		</media:content>
	</item>
		<item>
		<title>Took a short break, Getting back into this!</title>
		<link>http://codesupport.wordpress.com/2011/06/24/back/</link>
		<comments>http://codesupport.wordpress.com/2011/06/24/back/#comments</comments>
		<pubDate>Fri, 24 Jun 2011 05:26:07 +0000</pubDate>
		<dc:creator>Balaji Baskar</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://codesupport.wordpress.com/?p=121</guid>
		<description><![CDATA[Welcoming a new baby and getting promoted as a dad is a proud and responsible feeling, little &#8220;KRISH&#8221; has been keep me busy throughout, and has finally learnt to spare some time everyday to let me free, or may be I have adapted to his schedules when at home. Well, coming to my blog world, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codesupport.wordpress.com&amp;blog=3786821&amp;post=121&amp;subd=codesupport&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Welcoming a new baby and getting promoted as a dad is a proud and responsible feeling, little &#8220;KRISH&#8221; has been keep me busy throughout, and has finally learnt to spare some time everyday to let me free, or may be I have adapted to his schedules when at home. <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Well, coming to my blog world, I always wanted to investigate a bit on how GMAIL has been smartly displaying related links / products / ads when reading my email, thou it looks to be fascinating at the beginning, a little thought has provoked my mind urging the need to find the smoking gun behind this, most importantly does GOOGLE read my email contents? So that&#8217;s what my next post is going to be!</p>
<br />Filed under: <a href='http://codesupport.wordpress.com/category/personal/'>Personal</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codesupport.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codesupport.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codesupport.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codesupport.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codesupport.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codesupport.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codesupport.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codesupport.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codesupport.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codesupport.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codesupport.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codesupport.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codesupport.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codesupport.wordpress.com/121/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codesupport.wordpress.com&amp;blog=3786821&amp;post=121&amp;subd=codesupport&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://codesupport.wordpress.com/2011/06/24/back/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>35.044977 -85.316207</georss:point>
		<geo:lat>35.044977</geo:lat>
		<geo:long>-85.316207</geo:long>
		<media:content url="http://1.gravatar.com/avatar/fdf00825cf9b71df2f82c90a4c7022ae?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">BALU</media:title>
		</media:content>
	</item>
		<item>
		<title>Playing MP3 from C#</title>
		<link>http://codesupport.wordpress.com/2011/03/01/mp3/</link>
		<comments>http://codesupport.wordpress.com/2011/03/01/mp3/#comments</comments>
		<pubDate>Tue, 01 Mar 2011 05:12:44 +0000</pubDate>
		<dc:creator>Balaji Baskar</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[irrKlang]]></category>
		<category><![CDATA[MP3]]></category>
		<category><![CDATA[NAudio]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://codesupport.wordpress.com/?p=113</guid>
		<description><![CDATA[After handling a huge collections of MP3 files, one in my back-up drive and another in my hard-disk&#8217;s library, It meant huge gobbling up so much space, which of course you realize when your external hard-drive shows up &#8220;Drive Full&#8221; message. And an idea bloomed to create this mp3 player which plays files stored in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codesupport.wordpress.com&amp;blog=3786821&amp;post=113&amp;subd=codesupport&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>After handling a huge collections of MP3 files, one in my back-up drive and another in my hard-disk&#8217;s library, It meant huge gobbling up so much space, which of course you realize when your external hard-drive shows up &#8220;Drive Full&#8221; message. And an idea bloomed to create this mp3 player which plays files stored in my database!</p>
<p>I have named it &#8220;<strong>Byte Player</strong>&#8221; and according to the name the application would be playing the music when data is fed into as byte arrays. The database is designed using the same strategy that&#8217;s designed to store normal files.</p>
<p>Add the following DLL reference: &#8220;irrKlang.NET4&#8243; and put the following DLLs to your bin folder:<br />
~ ikpFlac.dll<br />
~ ikpMP3.dll<br />
~ irrKlang.NET4.dll</p>
<p>Use the following reference:<br />
<pre class="brush: csharp;">
using IrrKlang;
</pre></p>
<p>Generated Database Script to Create Table:<br />
<pre class="brush: sql;">
CREATE TABLE [dbo].[MusicLibrary](
	[FileID] [uniqueidentifier] ROWGUIDCOL  NOT NULL,
	[FileName] [nvarchar](50) NOT NULL,
	[FileContent] [varbinary](max) NOT NULL,
	[FileType] [nvarchar](50) NOT NULL,
	[CreateBy] [nvarchar](128) NULL,
	[CreatedOn] [datetime] NULL,
	[ModifiedBy] [nvarchar](128) NULL,
	[ModifiedOn] [datetime] NULL,
 CONSTRAINT [PK_MusicLibrary] PRIMARY KEY CLUSTERED 
(
	[FileID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[MusicLibrary] ADD  CONSTRAINT [DF_MusicLibrary_FileID]  DEFAULT (newid()) FOR [FileID]
GO

ALTER TABLE [dbo].[MusicLibrary] ADD  CONSTRAINT [DF_MusicLibrary_CreateBy]  DEFAULT (user_name(user_id(user_name()))) FOR [CreateBy]
GO

ALTER TABLE [dbo].[MusicLibrary] ADD  CONSTRAINT [DF_MusicLibrary_CreatedOn]  DEFAULT (getdate()) FOR [CreatedOn]
GO

ALTER TABLE [dbo].[MusicLibrary] ADD  CONSTRAINT [DF_MusicLibrary_ModifiedBy]  DEFAULT (user_name(user_id(user_name()))) FOR [ModifiedBy]
GO

ALTER TABLE [dbo].[MusicLibrary] ADD  CONSTRAINT [DF_MusicLibrary_ModifiedOn]  DEFAULT (getdate()) FOR [ModifiedOn]
GO
</pre></p>
<p>The C# application will hold the following methods to interact with the database.</p>
<p><pre class="brush: csharp;">
const string connectionString = @&quot;Server=KRISHNA\SQLEXPRESS;Database=music;Trusted_Connection=True;&quot;;

/// &lt;summary&gt;
/// Function to select files from the computer to be saved in the database.
/// &lt;/summary&gt;
private void OpenMP3Files()
{
    OpenFileDialog dialog = new OpenFileDialog();
    dialog.Filter = &quot;MP3 files|*.mp3&quot;;
    dialog.FilterIndex = 1;
    dialog.InitialDirectory = @&quot;C:\\&quot;;
    dialog.RestoreDirectory = true;
    dialog.CheckFileExists = true;
    dialog.CheckPathExists = true;
    dialog.Multiselect = true;
    if (dialog.ShowDialog() == DialogResult.OK)
    {
        Cursor.Current = Cursors.WaitCursor;
        foreach (string filename in dialog.FileNames)
        {
            FileStream stream = new FileStream(filename, FileMode.Open, FileAccess.Read);
            using (BinaryReader reader = new BinaryReader(stream))
            {
                long length = new FileInfo(filename).Length;
                InsertMP3File(Path.GetFileName(filename), reader.ReadBytes((int)length));
            }
        }
        GetAllMP3();
    }
}

/// &lt;summary&gt;
/// Retrieves entire MP3 list from database (excludes the file content)
/// &lt;/summary&gt;
private void GetAllMP3()
{
    string queryString = &quot;SELECT [FileID], [FileName] FROM [MusicLibrary]&quot;;
    using (SqlConnection connection = new SqlConnection(connectionString))
    {
        SqlDataAdapter adapter = new SqlDataAdapter();
        adapter.SelectCommand = new SqlCommand(queryString, connection);
        DataSet dataset = new DataSet();
        adapter.Fill(dataset);
        if (dataset.Tables.Count &gt; 0)
        {
            gridMusic.DataSource = dataset.Tables[0];
            gridMusic.Columns[0].Visible = false;
            gridMusic.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
        }
    }
}

/// &lt;summary&gt;
/// Individual files are stored in the database.
/// &lt;/summary&gt;
/// &lt;param name=&quot;filename&quot;&gt;&lt;/param&gt;
/// &lt;param name=&quot;data&quot;&gt;&lt;/param&gt;
private void InsertMP3File(string filename, byte[] data)
{
    string filetype = @&quot;audio / mpeg&quot;;
    string queryString = &quot;INSERT INTO [MusicLibrary] ([FileName] ,[FileContent] ,[FileType]) VALUES (@FileName, @FileContent, @FileType)&quot;;
    using (SqlConnection connection = new SqlConnection(connectionString))
    {
        SqlCommand command = new SqlCommand(queryString, connection);
        command.Parameters.Add(new SqlParameter(&quot;@FileName&quot;, (object)filename));
        command.Parameters.Add(new SqlParameter(&quot;@FileContent&quot;, (object)data));
        command.Parameters.Add(new SqlParameter(&quot;@FileType&quot;, (object)filetype));
        command.Connection.Open();
        command.ExecuteNonQuery();
        command.Connection.Close();
    }
}
</pre></p>
<p>Inorder to play the MP3 file I had some initial consideration and based on some strong reviews started of with the &#8220;NAudio&#8221; library [Ref: <a href="http://naudio.codeplex.com">http://naudio.codeplex.com</a>] but i faced some issues while trying to play the file from stream and upon searching through discussion forums I discovered that these issues are currently being worked upon and would have a fix in future releases; Therefore i was forced to consider my second choice &#8220;irrKlang&#8221; sound library [Ref: <a href="http://www.ambiera.com/irrklang/">http://www.ambiera.com/irrklang/</a>] and it worked out to be more simple and brilliant! The code illustrated below shows the fine integration between this library api and the database.</p>
<p><pre class="brush: csharp;">
const string sound = &quot;static.mp3&quot;;
ISoundEngine engine = new ISoundEngine();

/// &lt;summary&gt;
/// Retrieve individual file content from database
/// &lt;/summary&gt;
/// &lt;param name=&quot;fileID&quot;&gt;&lt;/param&gt;
private void GetMP3Data(string fileID)
{
    string queryString = &quot;SELECT [FileContent] FROM [MusicLibrary] WHERE [FileID] = @FileID&quot;;
    using (SqlConnection connection = new SqlConnection(connectionString))
    {
        SqlCommand command = new System.Data.SqlClient.SqlCommand(queryString, connection);
        command.Parameters.Add(new SqlParameter(&quot;@FileID&quot;, (object)fileID));
        command.Connection.Open();
        byte[] buffer = (byte[])command.ExecuteScalar();
        if (engine.IsCurrentlyPlaying(sound))
        {
            engine.RemoveAllSoundSources();
        }
        PlayMP3(buffer, sound);
        command.Connection.Close();
    }
}

/// &lt;summary&gt;
/// Play a single MP3 file
/// &lt;/summary&gt;
/// &lt;param name=&quot;data&quot;&gt;&lt;/param&gt;
/// &lt;param name=&quot;filename&quot;&gt;&lt;/param&gt;
private void PlayMP3(byte[] data, string filename)
{
    ISoundSource source = engine.AddSoundSourceFromMemory(data, filename);
    engine.Play2D(filename);
}
</pre></p>
<p>I am so much interested in improving this and building a full-fledged player that would support right from ripping CD&#8217;s and expanding the database to include more information about the music albums and MP3 tags.</p>
<br />Filed under: <a href='http://codesupport.wordpress.com/category/c/'>C#</a>, <a href='http://codesupport.wordpress.com/category/database/'>Database</a> Tagged: <a href='http://codesupport.wordpress.com/tag/c/'>C#</a>, <a href='http://codesupport.wordpress.com/tag/irrklang/'>irrKlang</a>, <a href='http://codesupport.wordpress.com/tag/mp3/'>MP3</a>, <a href='http://codesupport.wordpress.com/tag/naudio/'>NAudio</a>, <a href='http://codesupport.wordpress.com/tag/sql-server/'>SQL Server</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codesupport.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codesupport.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codesupport.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codesupport.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codesupport.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codesupport.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codesupport.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codesupport.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codesupport.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codesupport.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codesupport.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codesupport.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codesupport.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codesupport.wordpress.com/113/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codesupport.wordpress.com&amp;blog=3786821&amp;post=113&amp;subd=codesupport&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://codesupport.wordpress.com/2011/03/01/mp3/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		<georss:point>35.044977 -85.316207</georss:point>
		<geo:lat>35.044977</geo:lat>
		<geo:long>-85.316207</geo:long>
		<media:content url="http://1.gravatar.com/avatar/fdf00825cf9b71df2f82c90a4c7022ae?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">BALU</media:title>
		</media:content>
	</item>
		<item>
		<title>DataSet.ReadXmlSchema Method Limitations</title>
		<link>http://codesupport.wordpress.com/2011/02/23/dataset-readxmlschema-method-limitations/</link>
		<comments>http://codesupport.wordpress.com/2011/02/23/dataset-readxmlschema-method-limitations/#comments</comments>
		<pubDate>Wed, 23 Feb 2011 20:25:40 +0000</pubDate>
		<dc:creator>Balaji Baskar</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[C Sharp]]></category>
		<category><![CDATA[Dataset]]></category>
		<category><![CDATA[KB Article]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[ReadXmlSchema]]></category>
		<category><![CDATA[Support]]></category>
		<category><![CDATA[XML Schema]]></category>

		<guid isPermaLink="false">http://codesupport.wordpress.com/?p=100</guid>
		<description><![CDATA[We basically use the DataSet.ReadXmlSchema Method to create the schema which includes table, relation, and constraint definitions for the Dataset. Having said this here is something that&#8217;s worth sharing to all of my fellow developers who happen to stumble upon this post in search of a situation to find that their dataset is loading incorrect [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codesupport.wordpress.com&amp;blog=3786821&amp;post=100&amp;subd=codesupport&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>We basically use the DataSet.ReadXmlSchema Method to create the schema which includes table, relation, and constraint definitions for the Dataset. Having said this here is something that&#8217;s worth sharing to all of my fellow developers who happen to stumble upon this post in search of a situation to find that their dataset is loading incorrect tables when your xml schema is being read!</p>
<p><strong>Case 1: Sample1.xsd</strong><br />
<pre class="brush: xml;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot;?&gt;
&lt;xs:schema xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot; elementFormDefault=&quot;qualified&quot;&gt;
  &lt;xs:simpleType name=&quot;PropertyNames&quot;&gt;
    &lt;xs:restriction base=&quot;xs:string&quot;&gt;
      &lt;xs:enumeration value=&quot;prop1&quot;&gt;&lt;/xs:enumeration&gt;
      &lt;xs:enumeration value=&quot;prop2&quot;&gt;&lt;/xs:enumeration&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:element name=&quot;Items&quot;&gt;
    &lt;xs:complexType&gt;
      &lt;xs:sequence&gt;
        &lt;xs:element name=&quot;Item&quot; maxOccurs=&quot;unbounded&quot;&gt;
          &lt;xs:complexType&gt;
            &lt;xs:sequence&gt;
              &lt;xs:element name=&quot;name&quot; type=&quot;xs:string&quot;/&gt;
              &lt;xs:element name=&quot;properties&quot; type=&quot;xs:string&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;/&gt;
            &lt;/xs:sequence&gt;
          &lt;/xs:complexType&gt;
        &lt;/xs:element&gt;
      &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
&lt;/xs:schema&gt;
</pre></p>
<p>When you use the dataset&#8217;s &#8220;ReadXmlSchema&#8221; method you will find that the dataset will contain 2 tables!<br />
<pre class="brush: csharp;">
// Create the DataSet to read the schema into.
DataSet ds = new DataSet();
// Invoke the ReadXmlSchema method with the file name.
ds.ReadXmlSchema(@&quot;C:\\test\\Sample1.xsd&quot;);
</pre></p>
<p>A XML instance representation for this schema will be:<br />
<pre class="brush: xml;">
&lt;Items&gt;
  &lt;Item&gt; [1..*]
    &lt;name&gt; xs:string &lt;/name&gt; [1]
    &lt;properties&gt; xs:string &lt;/properties&gt; [0..*]
  &lt;/Item&gt;
&lt;/Items&gt;
</pre></p>
<p><strong>Case 2: Sample2.xsd</strong><br />
<pre class="brush: xml;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;iso-8859-1&quot;?&gt;
&lt;xs:schema xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot; elementFormDefault=&quot;qualified&quot;&gt;
  &lt;xs:simpleType name=&quot;PropertyNames&quot;&gt;
    &lt;xs:restriction base=&quot;xs:string&quot;&gt;
      &lt;xs:enumeration value=&quot;prop1&quot;&gt;&lt;/xs:enumeration&gt;
      &lt;xs:enumeration value=&quot;prop2&quot;&gt;&lt;/xs:enumeration&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:element name=&quot;Items&quot;&gt;
    &lt;xs:complexType&gt;
      &lt;xs:sequence&gt;
        &lt;xs:element name=&quot;Item&quot; maxOccurs=&quot;unbounded&quot;&gt;
          &lt;xs:complexType&gt;
            &lt;xs:sequence&gt;
              &lt;xs:element name=&quot;name&quot; type=&quot;xs:string&quot;/&gt;
              &lt;xs:element name=&quot;properties&quot; type=&quot;PropertyNames&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;/&gt;
            &lt;/xs:sequence&gt;
          &lt;/xs:complexType&gt;
        &lt;/xs:element&gt;
      &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
&lt;/xs:schema&gt;
</pre></p>
<p>This time when you execute the following code you will find that the dataset will contain 1 table!<br />
<pre class="brush: csharp;">
// Create the DataSet to read the schema into.
DataSet ds = new DataSet();
// Invoke the ReadXmlSchema method with the file name.
ds.ReadXmlSchema(@&quot;C:\\test\\Sample1.xsd&quot;);
</pre></p>
<p>Whereas the XML instance representation for this schema will be:<br />
<pre class="brush: xml;">
&lt;Items&gt;
  &lt;Item&gt; [1..*]
    &lt;name&gt; xs:string &lt;/name&gt; [1]
    &lt;properties&gt; PropertyNames &lt;/properties&gt; [0..*]
  &lt;/Item&gt;
&lt;/Items&gt;
</pre></p>
<p>Actually, you should have noted that thou the XML instance representation for this schema (Case 2) is similar to the one in (Case 1), the dataset had only one table instead of two; After several hours of investigation and read through, I happen to discover (atleast lucky) thats there is a &#8220;Microsoft Support Article&#8221; which explains the &#8220;Limitations for DataSet Schema Files (XSD)&#8221;.</p>
<p>Please find the references to the file at the following location: <a href="http://support.microsoft.com/kb/319372">http://support.microsoft.com/kb/319372</a></p>
<p><strong>Question</strong>: How does this article applies to my scenario?<br />
<strong>Answer</strong>: Use of Restriction Element Is Mostly Ignored<br />
You can derive a new simple type by restricting an existing simple type with the restriction element. When you use the restriction element in simple types, the restriction element is ignored. Therefore, all the sub-elements of that restriction element are ignored also.</p>
<p>All restriction elements are ignored except the XSD simple type &#8220;string&#8221;, and its facets as follows:<br />
&gt; length<br />
&gt; minlength<br />
&gt; maxlength</p>
<br />Filed under: <a href='http://codesupport.wordpress.com/category/c/'>C#</a>, <a href='http://codesupport.wordpress.com/category/xml/'>XML</a> Tagged: <a href='http://codesupport.wordpress.com/tag/net/'>.NET</a>, <a href='http://codesupport.wordpress.com/tag/c-sharp/'>C Sharp</a>, <a href='http://codesupport.wordpress.com/tag/c/'>C#</a>, <a href='http://codesupport.wordpress.com/tag/dataset/'>Dataset</a>, <a href='http://codesupport.wordpress.com/tag/kb-article/'>KB Article</a>, <a href='http://codesupport.wordpress.com/tag/microsoft/'>Microsoft</a>, <a href='http://codesupport.wordpress.com/tag/readxmlschema/'>ReadXmlSchema</a>, <a href='http://codesupport.wordpress.com/tag/support/'>Support</a>, <a href='http://codesupport.wordpress.com/tag/xml/'>XML</a>, <a href='http://codesupport.wordpress.com/tag/xml-schema/'>XML Schema</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codesupport.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codesupport.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codesupport.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codesupport.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codesupport.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codesupport.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codesupport.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codesupport.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codesupport.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codesupport.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codesupport.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codesupport.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codesupport.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codesupport.wordpress.com/100/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codesupport.wordpress.com&amp;blog=3786821&amp;post=100&amp;subd=codesupport&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://codesupport.wordpress.com/2011/02/23/dataset-readxmlschema-method-limitations/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<georss:point>35.044977 -85.316207</georss:point>
		<geo:lat>35.044977</geo:lat>
		<geo:long>-85.316207</geo:long>
		<media:content url="http://1.gravatar.com/avatar/fdf00825cf9b71df2f82c90a4c7022ae?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">BALU</media:title>
		</media:content>
	</item>
		<item>
		<title>How to create a ZIP file using C#</title>
		<link>http://codesupport.wordpress.com/2011/02/08/zip/</link>
		<comments>http://codesupport.wordpress.com/2011/02/08/zip/#comments</comments>
		<pubDate>Tue, 08 Feb 2011 19:24:25 +0000</pubDate>
		<dc:creator>Balaji Baskar</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Archive]]></category>
		<category><![CDATA[Compression]]></category>
		<category><![CDATA[Microsoft.Deployment.Compression.dll]]></category>
		<category><![CDATA[Microsoft.Deployment.Compression.Zip.dll]]></category>
		<category><![CDATA[Windows Installer XML (WiX) toolset]]></category>
		<category><![CDATA[WiX]]></category>
		<category><![CDATA[ZIP]]></category>

		<guid isPermaLink="false">http://codesupport.wordpress.com/?p=94</guid>
		<description><![CDATA[In my previous blog post we saw how to create CAB files using Windows Installer XML (WiX) toolset; In this post we will see how to create ZIP files using WiX toolset. In your .NET project add references to the following DLLs: Microsoft.Deployment.Compression.dll Microsoft.Deployment.Compression.Zip.dll And we will be using this library (Microsoft.Deployment.Compression.Zip) for creating CAB [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codesupport.wordpress.com&amp;blog=3786821&amp;post=94&amp;subd=codesupport&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In my previous blog post we saw how to create CAB files using Windows Installer XML (WiX) toolset; In this post we will see how to create ZIP files using WiX toolset.</p>
<p>In your .NET project add references to the following DLLs:<br />
Microsoft.Deployment.Compression.dll<br />
Microsoft.Deployment.Compression.Zip.dll</p>
<p>And we will be using this library (Microsoft.Deployment.Compression.Zip) for creating CAB (cabinet) files.</p>
<p><pre class="brush: csharp;">
using Microsoft.Deployment.Compression.Zip;
</pre></p>
<p>In our example we will see how to add individual files to the ZIP file and how to add a folder (directory) to the ZIP file and finally how to extract (unpack) the ZIP file.</p>
<p><pre class="brush: csharp;">
// CREATING ZIP FILE BY ADDING LIST OF FILES
ZipInfo zip = new ZipInfo(@&quot;C:\testarchive1.zip&quot;);
List&lt;string&gt; files = new List&lt;string&gt;();
files.Add(@&quot;C:\test1.txt&quot;);
files.Add(@&quot;C:\test2.txt&quot;);
files.Add(@&quot;C:\test3.txt&quot;);
zip.PackFiles(null, files, null);

// CREATING ZIP FILE BY ADDING FOLDER (WITH SUB-FOLDERS) USING MAXIMUM COMPRESSION
zip = new ZipInfo(@&quot;C:\testarchive2.zip&quot;);
zip.Pack(@&quot;C:\Balaji&quot;, true, Microsoft.Deployment.Compression.CompressionLevel.Max, null);

// EXTRACTING (UNPACKING) FILES FROM ZIP FILE
zip = new ZipInfo(@&quot;C:\testarchive2.zip&quot;);
zip.Unpack(@&quot;C:\ArchiveDir&quot;);
</pre></p>
<br />Filed under: <a href='http://codesupport.wordpress.com/category/c/'>C#</a> Tagged: <a href='http://codesupport.wordpress.com/tag/archive/'>Archive</a>, <a href='http://codesupport.wordpress.com/tag/c/'>C#</a>, <a href='http://codesupport.wordpress.com/tag/compression/'>Compression</a>, <a href='http://codesupport.wordpress.com/tag/microsoft-deployment-compression-dll/'>Microsoft.Deployment.Compression.dll</a>, <a href='http://codesupport.wordpress.com/tag/microsoft-deployment-compression-zip-dll/'>Microsoft.Deployment.Compression.Zip.dll</a>, <a href='http://codesupport.wordpress.com/tag/windows-installer-xml-wix-toolset/'>Windows Installer XML (WiX) toolset</a>, <a href='http://codesupport.wordpress.com/tag/wix/'>WiX</a>, <a href='http://codesupport.wordpress.com/tag/zip/'>ZIP</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codesupport.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codesupport.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codesupport.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codesupport.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codesupport.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codesupport.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codesupport.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codesupport.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codesupport.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codesupport.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codesupport.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codesupport.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codesupport.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codesupport.wordpress.com/94/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codesupport.wordpress.com&amp;blog=3786821&amp;post=94&amp;subd=codesupport&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://codesupport.wordpress.com/2011/02/08/zip/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<georss:point>35.044977 -85.316207</georss:point>
		<geo:lat>35.044977</geo:lat>
		<geo:long>-85.316207</geo:long>
		<media:content url="http://1.gravatar.com/avatar/fdf00825cf9b71df2f82c90a4c7022ae?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">BALU</media:title>
		</media:content>
	</item>
		<item>
		<title>How to create a CAB (cabinet) file using C#</title>
		<link>http://codesupport.wordpress.com/2011/02/08/cab/</link>
		<comments>http://codesupport.wordpress.com/2011/02/08/cab/#comments</comments>
		<pubDate>Tue, 08 Feb 2011 18:02:11 +0000</pubDate>
		<dc:creator>Balaji Baskar</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[CAB]]></category>
		<category><![CDATA[Cabinet]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Microsoft.Deployment.Compression.Cab.dll]]></category>
		<category><![CDATA[Microsoft.Deployment.Compression.dll]]></category>
		<category><![CDATA[Pack]]></category>
		<category><![CDATA[Unpack]]></category>
		<category><![CDATA[WiX toolset]]></category>

		<guid isPermaLink="false">http://codesupport.wordpress.com/?p=88</guid>
		<description><![CDATA[At present we do not have classes in .NET that enable us to create CAB (cabinet) files, hence we has other third party libraries and toolsets that provide their custom classes, one such is Windows Installer XML (WiX) toolset (http://wix.sourceforge.net) which is distributed with a collection of dlls as part of its SDK and best [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codesupport.wordpress.com&amp;blog=3786821&amp;post=88&amp;subd=codesupport&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>At present we do not have classes in .NET that enable us to create CAB (cabinet) files, hence we has other third party libraries and toolsets that provide their custom classes, one such is Windows Installer XML (WiX) toolset (<a href="http://wix.sourceforge.net">http://wix.sourceforge.net</a>) which is distributed with a collection of dlls as part of its SDK and best of all is that this is developed by Microsoft and we have good support for WiX users.</p>
<p>In your .NET project add references to the following DLLs:<br />
Microsoft.Deployment.Compression.dll<br />
Microsoft.Deployment.Compression.Cab.dll</p>
<p>And we will be using this library (Microsoft.Deployment.Compression.Cab) for creating CAB (cabinet) files.</p>
<p><pre class="brush: csharp;">
using Microsoft.Deployment.Compression.Cab;
</pre></p>
<p>In our example we will see how to add individual files to the CAB file and how to add a folder (directory) to the CAB file and finally how to extract (unpack) the CAB file.</p>
<p><pre class="brush: csharp;">
// CREATING CAB FILE BY ADDING LIST OF FILES
CabInfo cab = new CabInfo(@&quot;C:\testarchive1.cab&quot;);
List files = new List();
files.Add(@&quot;C:\test1.txt&quot;);
files.Add(@&quot;C:\test2.txt&quot;);
files.Add(@&quot;C:\test3.txt&quot;);
cab.PackFiles(null,files,null);

// CREATING CAB FILE BY ADDING FOLDER (WITH SUB-FOLDERS) USING MINIMUM COMPRESSION
cab = new CabInfo(@&quot;C:\testarchive2.cab&quot;);
cab.Pack(@&quot;C:\Balaji&quot;, true, Microsoft.Deployment.Compression.CompressionLevel.Min, null);

// EXTRACTING (UNPACKING) FILES FROM CAB FILE
cab = new CabInfo(@&quot;C:\testarchive1.cab&quot;);
cab.Unpack(@&quot;C:\ArchieveDir&quot;);
</pre></p>
<br />Filed under: <a href='http://codesupport.wordpress.com/category/c/'>C#</a> Tagged: <a href='http://codesupport.wordpress.com/tag/c/'>C#</a>, <a href='http://codesupport.wordpress.com/tag/cab/'>CAB</a>, <a href='http://codesupport.wordpress.com/tag/cabinet/'>Cabinet</a>, <a href='http://codesupport.wordpress.com/tag/microsoft/'>Microsoft</a>, <a href='http://codesupport.wordpress.com/tag/microsoft-deployment-compression-cab-dll/'>Microsoft.Deployment.Compression.Cab.dll</a>, <a href='http://codesupport.wordpress.com/tag/microsoft-deployment-compression-dll/'>Microsoft.Deployment.Compression.dll</a>, <a href='http://codesupport.wordpress.com/tag/pack/'>Pack</a>, <a href='http://codesupport.wordpress.com/tag/unpack/'>Unpack</a>, <a href='http://codesupport.wordpress.com/tag/wix-toolset/'>WiX toolset</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codesupport.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codesupport.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codesupport.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codesupport.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codesupport.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codesupport.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codesupport.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codesupport.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codesupport.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codesupport.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codesupport.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codesupport.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codesupport.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codesupport.wordpress.com/88/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codesupport.wordpress.com&amp;blog=3786821&amp;post=88&amp;subd=codesupport&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://codesupport.wordpress.com/2011/02/08/cab/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<georss:point>35.044977 -85.316207</georss:point>
		<geo:lat>35.044977</geo:lat>
		<geo:long>-85.316207</geo:long>
		<media:content url="http://1.gravatar.com/avatar/fdf00825cf9b71df2f82c90a4c7022ae?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">BALU</media:title>
		</media:content>
	</item>
	</channel>
</rss>
