<?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>IT is the Next Generation for World</title>
	<atom:link href="http://vikasmehta.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://vikasmehta.wordpress.com</link>
	<description>Some Hidden Facts and Private Thoughts of Self.</description>
	<lastBuildDate>Fri, 05 Jun 2009 08:49:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='vikasmehta.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>IT is the Next Generation for World</title>
		<link>http://vikasmehta.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://vikasmehta.wordpress.com/osd.xml" title="IT is the Next Generation for World" />
	<atom:link rel='hub' href='http://vikasmehta.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Use of Top and Distinct togather</title>
		<link>http://vikasmehta.wordpress.com/2009/06/05/use-of-top-and-distinct-togather/</link>
		<comments>http://vikasmehta.wordpress.com/2009/06/05/use-of-top-and-distinct-togather/#comments</comments>
		<pubDate>Fri, 05 Jun 2009 08:49:13 +0000</pubDate>
		<dc:creator>vikasmehta</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[top and distinct]]></category>
		<category><![CDATA[top and distinct records togather]]></category>
		<category><![CDATA[top in sql]]></category>

		<guid isPermaLink="false">http://vikasmehta.wordpress.com/2009/06/05/use-of-top-and-distinct-togather/</guid>
		<description><![CDATA[If you stuck to the confusion &#8220;Can i use top and distinct togather in single query?&#8221; Yes&#8230;.!! you can do for which you have to trick, i will explain it with both code non working and working. Non working : select top(10) distinct can_id from tblCandidate Working : select distinct top(10) can_id from tblCandidate After [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vikasmehta.wordpress.com&amp;blog=1118965&amp;post=30&amp;subd=vikasmehta&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you stuck to the confusion &#8220;Can i use top and distinct togather in single query?&#8221;</p>
<p>Yes&#8230;.!! you can do for which you have to trick, i will explain it with both code non working and working.</p>
<p>Non working : </p>
<p>select top(10) distinct can_id from tblCandidate</p>
<p>Working :</p>
<p>select distinct top(10)  can_id from tblCandidate</p>
<p>After all its a simple game of changing the sequence of words.</p>
<p>Happy coding.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vikasmehta.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vikasmehta.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vikasmehta.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vikasmehta.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vikasmehta.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vikasmehta.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vikasmehta.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vikasmehta.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vikasmehta.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vikasmehta.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vikasmehta.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vikasmehta.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vikasmehta.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vikasmehta.wordpress.com/30/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vikasmehta.wordpress.com&amp;blog=1118965&amp;post=30&amp;subd=vikasmehta&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vikasmehta.wordpress.com/2009/06/05/use-of-top-and-distinct-togather/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c6089d977563cf47ea42d8aead14aff3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vikasmehta</media:title>
		</media:content>
	</item>
		<item>
		<title>ConflictMode in Linq</title>
		<link>http://vikasmehta.wordpress.com/2009/03/31/conflictmode-in-linq/</link>
		<comments>http://vikasmehta.wordpress.com/2009/03/31/conflictmode-in-linq/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 13:49:00 +0000</pubDate>
		<dc:creator>vikasmehta</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ConflictMode]]></category>
		<category><![CDATA[FailOnFirstConflict]]></category>
		<category><![CDATA[Linq]]></category>

		<guid isPermaLink="false">http://vikasmehta.wordpress.com/2009/03/31/conflictmode-in-linq/</guid>
		<description><![CDATA[when you require to cancel all transactions on first occurance of conflict in Linq, there are two types of ConflictMode 1)FailOnFirstConflict 2)ContinueOnConflict you can use if somthing like given below, db.SubmitChanges(System.Data.Linq.ConflictMode.FailOnFirstConflict); in above code task will rollback when firstconflict will occurs. happy coding<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vikasmehta.wordpress.com&amp;blog=1118965&amp;post=29&amp;subd=vikasmehta&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>when you require to cancel all transactions on first occurance of conflict in Linq,<br />
there are two types of ConflictMode</p>
<p>1)FailOnFirstConflict<br />
2)ContinueOnConflict</p>
<p>you can use if somthing like given below,</p>
<p>db.SubmitChanges(System.Data.Linq.ConflictMode.FailOnFirstConflict);</p>
<p>in above code task will rollback when firstconflict will occurs.</p>
<p>happy coding <img src='http://s2.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vikasmehta.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vikasmehta.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vikasmehta.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vikasmehta.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vikasmehta.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vikasmehta.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vikasmehta.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vikasmehta.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vikasmehta.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vikasmehta.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vikasmehta.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vikasmehta.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vikasmehta.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vikasmehta.wordpress.com/29/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vikasmehta.wordpress.com&amp;blog=1118965&amp;post=29&amp;subd=vikasmehta&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vikasmehta.wordpress.com/2009/03/31/conflictmode-in-linq/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c6089d977563cf47ea42d8aead14aff3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vikasmehta</media:title>
		</media:content>
	</item>
		<item>
		<title>convert your enum to List</title>
		<link>http://vikasmehta.wordpress.com/2009/03/20/convert-your-enum-to-list/</link>
		<comments>http://vikasmehta.wordpress.com/2009/03/20/convert-your-enum-to-list/#comments</comments>
		<pubDate>Fri, 20 Mar 2009 20:23:37 +0000</pubDate>
		<dc:creator>vikasmehta</dc:creator>
				<category><![CDATA[DotNet Framework]]></category>
		<category><![CDATA[enumtoList]]></category>

		<guid isPermaLink="false">http://vikasmehta.wordpress.com/2009/03/20/convert-your-enum-to-list/</guid>
		<description><![CDATA[by converting to List we can more tweak with enums, i.e. by delegating the list we can filter only weekdays from enum and much more... :)<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vikasmehta.wordpress.com&amp;blog=1118965&amp;post=26&amp;subd=vikasmehta&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In one of scenario i want to return Enum to List with to list datasource, for that here i have drafted method which converts enum type to Generic List</p>
<div style="font-family:Courier New;font-size:10pt;color:black;background:white;">
<p style="margin:0;"><span style="color:#2b91af;"> 132</span> <span style="color:gray;">///</span><span style="color:green;"> </span><span style="color:gray;">&lt;summary&gt;</span></p>
<p style="margin:0;"><span style="color:#2b91af;"> 133</span> <span style="color:gray;">///</span><span style="color:green;"> Converts a enum to a list</span></p>
<p style="margin:0;"><span style="color:#2b91af;"> 134</span> <span style="color:gray;">///</span><span style="color:green;"> </span><span style="color:gray;">&lt;/summary&gt;</span></p>
<p style="margin:0;"><span style="color:#2b91af;"> 135</span> <span style="color:gray;">///</span><span style="color:green;"> </span><span style="color:gray;">&lt;typeparam name=&#8221;T&#8221;&gt;</span><span style="color:green;">string name of type of Enum</span><span style="color:gray;">&lt;/typeparam&gt;</span></p>
<p style="margin:0;"><span style="color:#2b91af;"> 136</span> <span style="color:gray;">///</span><span style="color:green;"> </span><span style="color:gray;">&lt;returns&gt;</span><span style="color:green;">An enumerable list of Enum Type &#8220;T&#8221;</span><span style="color:gray;">&lt;/returns&gt;</span></p>
<p style="margin:0;"><span style="color:#2b91af;"> 137</span> <span style="color:gray;">///</span><span style="color:green;"> </span><span style="color:gray;">&lt;remarks&gt;</span></p>
<p style="margin:0;"><span style="color:#2b91af;"> 138</span> <span style="color:gray;">///</span><span style="color:green;"> Usage:</span></p>
<p style="margin:0;"><span style="color:#2b91af;"> 139</span> <span style="color:gray;">///</span><span style="color:green;"> var list = StringComparison.CurrentCulture.EnumToList();</span></p>
<p style="margin:0;"><span style="color:#2b91af;"> 140</span> <span style="color:gray;">///</span><span style="color:green;"> </span><span style="color:gray;">&lt;/remarks&gt;</span></p>
<p style="margin:0;"><span style="color:#2b91af;"> 141</span> <span style="color:blue;">public</span> <span style="color:blue;">static</span> <span style="color:teal;">IEnumerable</span>&lt;T&gt; EnumToList&lt;T&gt;(<span style="color:blue;">this</span> T enumName) where T : <span style="color:blue;">struct</span></p>
<p style="margin:0;"><span style="color:#2b91af;"> 142</span> {</p>
<p style="margin:0;"><span style="color:#2b91af;"> 143</span> <span style="color:teal;">Type</span> enumType = enumName.GetType();</p>
<p style="margin:0;"><span style="color:#2b91af;"> 144</span> <span style="color:green;">// Can’t use generic type constraints on value types,</span></p>
<p style="margin:0;"><span style="color:#2b91af;"> 145</span> <span style="color:green;">// so have to do check like this</span></p>
<p style="margin:0;"><span style="color:#2b91af;"> 146</span> <span style="color:blue;">if</span> (enumType.BaseType != <span style="color:blue;">typeof</span> (<span style="color:teal;">Enum</span>))</p>
<p style="margin:0;"><span style="color:#2b91af;"> 147</span> <span style="color:blue;">throw</span> <span style="color:blue;">new</span> ArgumentException(enumType + <span style="color:maroon;">&#8221; is not an Enum.&#8221;</span>, <span style="color:maroon;">&#8220;T&#8221;</span>, <span style="color:blue;">null</span>);</p>
<p style="margin:0;"><span style="color:#2b91af;"> 148</span> var enumValArray = <span style="color:teal;">Enum</span>.GetValues(enumType);</p>
<p style="margin:0;"><span style="color:#2b91af;"> 149</span> var enumValList = <span style="color:blue;">new</span> <span style="color:teal;">List</span>&lt;T&gt;(enumValArray.Length);</p>
<p style="margin:0;"><span style="color:#2b91af;"> 150</span> <span style="color:blue;">foreach</span> (<span style="color:blue;">int</span> val <span style="color:blue;">in</span> enumValArray)</p>
<p style="margin:0;"><span style="color:#2b91af;"> 151</span> {</p>
<p style="margin:0;"><span style="color:#2b91af;"> 152</span> enumValList.Add((T) <span style="color:teal;">Enum</span>.Parse(enumType, val.ToString()));</p>
<p style="margin:0;"><span style="color:#2b91af;"> 153</span> }</p>
<p style="margin:0;"><span style="color:#2b91af;"> 154</span> <span style="color:blue;">return</span> enumValList;</p>
<p style="margin:0;"><span style="color:#2b91af;"> 155</span> }</p>
<p style="margin:0;"><span style="color:#2b91af;"> 156</span> }</p>
</div>
<p>here how you can access it.</p>
<p><!-- {\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Courier New;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0??;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;??\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;??\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;??\red192\green192\blue192;}??\fs20 var list = \cf10 StringComparison\cf0 .CurrentCulture.EnumToList();\par ?? \cf2 foreach\cf0  (var enumValue \cf2 in\cf0  list)\par ?? \{\par ?? ...\par ?? \}} --></p>
<div style="background:white none repeat scroll 0 0;font-family:Courier New;font-size:10pt;color:black;">
<p style="margin:0;"><span style="color:#2b91af;"> 128</span> var list = <span style="color:teal;">StringComparison</span>.CurrentCulture.EnumToList();</p>
<p style="margin:0;"><span style="color:#2b91af;"> 129</span> <span style="color:blue;">foreach</span> (var enumValue <span style="color:blue;">in</span> list)</p>
<p style="margin:0;"><span style="color:#2b91af;"> 130</span> {</p>
<p style="margin:0;"><span style="color:#2b91af;"> 131</span> &#8230;</p>
<p style="margin:0;"><span style="color:#2b91af;"> 132</span> }</p>
</div>
<p>Happy coding.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vikasmehta.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vikasmehta.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vikasmehta.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vikasmehta.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vikasmehta.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vikasmehta.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vikasmehta.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vikasmehta.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vikasmehta.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vikasmehta.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vikasmehta.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vikasmehta.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vikasmehta.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vikasmehta.wordpress.com/26/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vikasmehta.wordpress.com&amp;blog=1118965&amp;post=26&amp;subd=vikasmehta&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vikasmehta.wordpress.com/2009/03/20/convert-your-enum-to-list/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c6089d977563cf47ea42d8aead14aff3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vikasmehta</media:title>
		</media:content>
	</item>
		<item>
		<title>What is FOR XML AUTO,XMLDATA and ELEMENTS</title>
		<link>http://vikasmehta.wordpress.com/2008/08/12/what-is-for-xml-autoxmldata-and-elements/</link>
		<comments>http://vikasmehta.wordpress.com/2008/08/12/what-is-for-xml-autoxmldata-and-elements/#comments</comments>
		<pubDate>Tue, 12 Aug 2008 07:19:54 +0000</pubDate>
		<dc:creator>vikasmehta</dc:creator>
				<category><![CDATA[Biztalk]]></category>
		<category><![CDATA[ELEMENTS]]></category>
		<category><![CDATA[FOR XML AUTO]]></category>
		<category><![CDATA[FOR XML EXPLICIT]]></category>
		<category><![CDATA[XMLDATA]]></category>

		<guid isPermaLink="false">http://vikasmehta.wordpress.com/?p=23</guid>
		<description><![CDATA[Hi, As biztalk developer, when in begining of developing you may face problem understanding  what is  difference between FOR XML AUTO,XMLDATA and ELEMENTS. here in this note i&#8217;ll explain you one by one. FOR XML AUTO : is used to represent the actual data in xml format. FOR XML AUTO , XMLDATA : is used [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vikasmehta.wordpress.com&amp;blog=1118965&amp;post=23&amp;subd=vikasmehta&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>As biztalk developer, when in begining of developing you may face problem understanding  what is  difference between FOR XML AUTO,XMLDATA and ELEMENTS.</p>
<p>here in this note i&#8217;ll explain you one by one.</p>
<ul>
<li>FOR XML AUTO : is used to represent the actual data in xml format.</li>
<li>FOR XML AUTO , XMLDATA : is used to represent the actual data in xml format while generatiing schema.</li>
<li>FOR XML AUTO , ELEMENTS : is used to represent the actual data in xml element type which is most suggested method of generating of xml from SQL.</li>
<li>FOR XML EXPLICIT : is used to generate complicated XML message where you want result from different tables at that time you can format the result set in correct XML structure via FOR XML Explicit.</li>
</ul>
<p>for simplify to understand the above please feel free to mail me(vkas_in_guj@hotmail.com) or post me.</p>
<p>Happy coding,</p>
<p>Vikas.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/vikasmehta.wordpress.com/23/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/vikasmehta.wordpress.com/23/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vikasmehta.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vikasmehta.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vikasmehta.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vikasmehta.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vikasmehta.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vikasmehta.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vikasmehta.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vikasmehta.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vikasmehta.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vikasmehta.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vikasmehta.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vikasmehta.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vikasmehta.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vikasmehta.wordpress.com/23/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vikasmehta.wordpress.com&amp;blog=1118965&amp;post=23&amp;subd=vikasmehta&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vikasmehta.wordpress.com/2008/08/12/what-is-for-xml-autoxmldata-and-elements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c6089d977563cf47ea42d8aead14aff3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vikasmehta</media:title>
		</media:content>
	</item>
		<item>
		<title>Postback in TreeView Select Node Click</title>
		<link>http://vikasmehta.wordpress.com/2008/07/12/postback-in-treeview-select-node-click/</link>
		<comments>http://vikasmehta.wordpress.com/2008/07/12/postback-in-treeview-select-node-click/#comments</comments>
		<pubDate>Sat, 12 Jul 2008 13:25:25 +0000</pubDate>
		<dc:creator>vikasmehta</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[linkbutton]]></category>
		<category><![CDATA[optionbutton]]></category>
		<category><![CDATA[TreeView postback]]></category>

		<guid isPermaLink="false">http://vikasmehta.wordpress.com/?p=18</guid>
		<description><![CDATA[if you are facing problem of POSTBACK while working with TreeView Selected Node click, here with this post i provide you one alternative which will work on all three browsers. follow is the sample code which you can change with your respective code. TreeNode node = new TreeNode(); node.Text = &#8220;&#60;span onclick=&#8217;return false;&#8217;&#62;&#8221;+YourText+&#8221;&#60;/span&#62;&#8221;; this will [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vikasmehta.wordpress.com&amp;blog=1118965&amp;post=18&amp;subd=vikasmehta&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>if you are facing problem of POSTBACK while working with TreeView Selected Node click, here with this post i provide you one alternative which will work on all three browsers.</p>
<p>follow is the sample code which you can change with your respective code.</p>
<p>TreeNode node = new TreeNode();</p>
<p>node.Text = &#8220;&lt;span onclick=&#8217;return false;&#8217;&gt;&#8221;+<strong>YourText</strong>+&#8221;&lt;/span&gt;&#8221;;</p>
<p>this will force browser to &lt;a href=&#8221;javascript:webform_doPostback&#8221;&#8230;&#8230;.</p>
<p>please drop your commnet how and in what situation above code helpful to you.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/vikasmehta.wordpress.com/18/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/vikasmehta.wordpress.com/18/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vikasmehta.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vikasmehta.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vikasmehta.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vikasmehta.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vikasmehta.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vikasmehta.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vikasmehta.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vikasmehta.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vikasmehta.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vikasmehta.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vikasmehta.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vikasmehta.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vikasmehta.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vikasmehta.wordpress.com/18/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vikasmehta.wordpress.com&amp;blog=1118965&amp;post=18&amp;subd=vikasmehta&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vikasmehta.wordpress.com/2008/07/12/postback-in-treeview-select-node-click/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c6089d977563cf47ea42d8aead14aff3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vikasmehta</media:title>
		</media:content>
	</item>
		<item>
		<title>?? operator (C#)</title>
		<link>http://vikasmehta.wordpress.com/2008/04/02/operator-c/</link>
		<comments>http://vikasmehta.wordpress.com/2008/04/02/operator-c/#comments</comments>
		<pubDate>Wed, 02 Apr 2008 11:38:20 +0000</pubDate>
		<dc:creator>vikasmehta</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[?? operator]]></category>
		<category><![CDATA[null coaleascing Operator]]></category>

		<guid isPermaLink="false">http://vikasmehta.wordpress.com/2008/04/02/operator-c/</guid>
		<description><![CDATA[The ?? operator returns the left-hand operand if it is not null, or else it returns the right operand. For example: int? x = null; &#8230; // y = x, unless x is null, in which case y = -1. int y = x ?? -1; The ?? operator also works with reference types: //message [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vikasmehta.wordpress.com&amp;blog=1118965&amp;post=17&amp;subd=vikasmehta&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The ?? operator returns the left-hand operand if it is not null, or else it returns the right operand. For example:</p>
<p>int? x = null;</p>
<p>&#8230;</p>
<p>// y = x, unless x is null, in which case y = -1.</p>
<p>int y = x ?? -1;</p>
<p>The ?? operator also works with reference types:</p>
<p>//message = param, unless param is null</p>
<p>//in which case message = &#8220;No message&#8221;</p>
<p>string message = param ?? &#8220;No message&#8221;;</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/vikasmehta.wordpress.com/17/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/vikasmehta.wordpress.com/17/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vikasmehta.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vikasmehta.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vikasmehta.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vikasmehta.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vikasmehta.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vikasmehta.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vikasmehta.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vikasmehta.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vikasmehta.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vikasmehta.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vikasmehta.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vikasmehta.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vikasmehta.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vikasmehta.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vikasmehta.wordpress.com&amp;blog=1118965&amp;post=17&amp;subd=vikasmehta&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vikasmehta.wordpress.com/2008/04/02/operator-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c6089d977563cf47ea42d8aead14aff3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vikasmehta</media:title>
		</media:content>
	</item>
		<item>
		<title>PreRequesthandlerExecute and Global.asax</title>
		<link>http://vikasmehta.wordpress.com/2008/02/26/prerequesthandlerexecute-and-globalasax/</link>
		<comments>http://vikasmehta.wordpress.com/2008/02/26/prerequesthandlerexecute-and-globalasax/#comments</comments>
		<pubDate>Tue, 26 Feb 2008 12:13:03 +0000</pubDate>
		<dc:creator>vikasmehta</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Global.asax]]></category>
		<category><![CDATA[PreRequestHandlerExecute]]></category>
		<category><![CDATA[Session State]]></category>
		<category><![CDATA[SingleUser at a time]]></category>

		<guid isPermaLink="false">http://vikasmehta.wordpress.com/?p=16</guid>
		<description><![CDATA[PreRequesthandlerExecute event is raised before the Init() method of Page or Service called. but it is not true that each and every need session and do not want to utilize their session on the same event when it is raising.. to solve this problem just single line code will helpful.. protected void Application_PreRequestHandlerExecute(Object sender, EventArgs [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vikasmehta.wordpress.com&amp;blog=1118965&amp;post=16&amp;subd=vikasmehta&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>PreRequesthandlerExecute event is raised before the Init() method of Page or Service called. but it is not true that each and every need session and do not want to utilize their session on the same event when it is raising..</p>
<p>to solve this problem just single line code will helpful..</p>
<p>protected void Application_PreRequestHandlerExecute(Object sender, EventArgs<br />
e)</p>
<p>{</p>
<p>if (Context.Handler is IRequiresSessionState || Context.Handler is IReadOnlySessionState)<br />
{<br />
// your code over here<br />
}</p>
<p>}</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/vikasmehta.wordpress.com/16/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/vikasmehta.wordpress.com/16/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vikasmehta.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vikasmehta.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vikasmehta.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vikasmehta.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vikasmehta.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vikasmehta.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vikasmehta.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vikasmehta.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vikasmehta.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vikasmehta.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vikasmehta.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vikasmehta.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vikasmehta.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vikasmehta.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vikasmehta.wordpress.com&amp;blog=1118965&amp;post=16&amp;subd=vikasmehta&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vikasmehta.wordpress.com/2008/02/26/prerequesthandlerexecute-and-globalasax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c6089d977563cf47ea42d8aead14aff3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vikasmehta</media:title>
		</media:content>
	</item>
		<item>
		<title>A software &#8220;build&#8221; is a lot more than just compiling the solution &#8211; By pressing just F5</title>
		<link>http://vikasmehta.wordpress.com/2008/01/18/a-software-build-is-a-lot-more-than-just-compiling-the-solution-by-pressing-just-f5/</link>
		<comments>http://vikasmehta.wordpress.com/2008/01/18/a-software-build-is-a-lot-more-than-just-compiling-the-solution-by-pressing-just-f5/#comments</comments>
		<pubDate>Fri, 18 Jan 2008 13:49:42 +0000</pubDate>
		<dc:creator>vikasmehta</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Agile]]></category>
		<category><![CDATA[Agile Build Process]]></category>
		<category><![CDATA[Build]]></category>
		<category><![CDATA[Build Process]]></category>
		<category><![CDATA[MSBuild]]></category>
		<category><![CDATA[Visual Studio Build]]></category>

		<guid isPermaLink="false">http://vikasmehta.wordpress.com/2008/01/18/a-software-build-is-a-lot-more-than-just-compiling-the-solution-by-pressing-just-f5/</guid>
		<description><![CDATA[Many developers don&#8217;t use source control and don&#8217;t use any automated tools.  This is extremely inefficient and troublesome.  Those on teams are forced to use source control in an effort to share the latest code with all members of the team.  In the source control environments, there is a tacit agreement not to commit any [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vikasmehta.wordpress.com&amp;blog=1118965&amp;post=15&amp;subd=vikasmehta&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="font-size:10pt;font-family:'Times New Roman';">Many developers don&#8217;t use source control and don&#8217;t use any automated tools.  This is extremely inefficient and troublesome.  Those on teams are forced to use source control in an effort to share the latest code with all members of the team.  In the source control environments, there is a tacit agreement not to commit any code to the repository that will break the build.  If the build breaks, it hinders the velocity of the other developers on the team because they cannot move on while the build is broken.</span></p>
<p><span style="font-size:10pt;font-family:'Times New Roman';"><strong>What does &#8220;build&#8221; mean?</strong><br />
Some folks use the term &#8220;build&#8221; to mean compile, and that is incorrect.  On the teams that use no automated tools, the compile might be the only step in their build process, but the two are still different.  The &#8220;build&#8221; is a process of taking the source of a software system and making it ready for deployment.  Some teams will manually compile the source and stop before deploying to a development environment.  These teams are short-changing themselves because the only feedback they&#8217;ve obtained about the current bits is that there are no syntax or linking errors.  There is no verification that any part of the software functions as intended.  Next, they may manually perform some steps to get all the bits and configuration in order to deploy the system to a development environment.  Then after some manual testing, they&#8217;ve obtained some level of feedback.</span></p>
<p><span style="font-size:10pt;font-family:'Times New Roman';">Let&#8217;s compare the above with an Agile build.<br />
Here are some steps that are often performed in the build process of an Agile team &#8211; these steps are always automated so they run fast and are repeatable:</span></p>
<p><span style="font-size:10pt;font-family:'Times New Roman';"><strong>update latest code _and dependencies_ from source control.</strong>  (automated process will get latest code from the SCC repository)</span></p>
<p><span style="font-size:10pt;font-family:'Times New Roman';"><strong>compile solution</strong> (standard compile and link)</span></p>
<p><span style="font-size:10pt;font-family:'Times New Roman';"><strong>copy application files to test location</strong> (output binaries moved to location to prep for automated testing)</span></p>
<p><span style="font-size:10pt;font-family:'Times New Roman';"><strong>run automated unit tests.</strong> (automated tests produced through TDD or otherwise &#8211; give immediate feedback on the state of the system)<br />
automated environment setup to prepare for an integrated test of the system</span></p>
<p><span style="font-size:10pt;font-family:'Times New Roman';"><strong>run integration tests.</strong> (gives even more feedback that the integration points of the system are functioning correctly &#8211; might include a database)<br />
<strong>run regression tests</strong> (if you have them &#8211; verifies that all past functionality is still working as before &#8211; this is a type of integration test)<br />
<strong>tag source control with build number if successful</strong> (only tag successful builds &#8211; discard unsuccessful ones)<br />
<strong>Notify</strong> development team members of <strong>success</strong> or <strong>failure</strong><br />
Some teams add more steps depending on their needs, and some teams don&#8217;t have integration or regression tests suites yet.  Each build process should be developed by the team and tailored to the system.  The above are some of the more common steps that Agile teams include in a build process.</span></p>
<p><span style="font-size:10pt;font-family:'Times New Roman';">The point of an automated build process is to transform the current code into a working system and get feedback on the current quality as fast as possible.  If the entire process is fast, you will run it often and obtain feedback often.  If it&#8217;s slow, you won&#8217;t do it often.  The only requirement for the developer is to start the build.  Many Agile teams even automate that step by having a program kick off a build after every commit to the SCC repository.  That process is called &#8220;Continuous Integration&#8221;.  </span></p>
<p><span style="font-size:10pt;font-family:'Times New Roman';">At the end of a build, the team should be confident that if they deployed these bits to an environment, it would work.  There still may be bugs discovered, but they are confident that old bugs haven&#8217;t resurfaced and the system works at least as good as it did on the last build.  The extra testing steps in the build process ensure that the state of the software is always moving forward.  Without these steps, developers have no way of knowing if a change broke an existing feature.</span></p>
<p><span style="font-size:10pt;font-family:'Times New Roman';"><strong>Feedback</strong> is key in a build process.  The team should decide what steps can be added to the build process to generate as much feedback as possible.  My team recently inherited a system with a build duration of 25 minutes.  This is way to slow for us, and our initial goal is to reduce that duration to 10 minutes.  We&#8217;ll be able to do this by emphasizing fast unit tests more and doing away with some of the really slow integration tests (that have delicate, cumbersome data setup scenarios).<br />
</span></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/vikasmehta.wordpress.com/15/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/vikasmehta.wordpress.com/15/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vikasmehta.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vikasmehta.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vikasmehta.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vikasmehta.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vikasmehta.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vikasmehta.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vikasmehta.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vikasmehta.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vikasmehta.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vikasmehta.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vikasmehta.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vikasmehta.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vikasmehta.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vikasmehta.wordpress.com/15/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vikasmehta.wordpress.com&amp;blog=1118965&amp;post=15&amp;subd=vikasmehta&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vikasmehta.wordpress.com/2008/01/18/a-software-build-is-a-lot-more-than-just-compiling-the-solution-by-pressing-just-f5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c6089d977563cf47ea42d8aead14aff3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vikasmehta</media:title>
		</media:content>
	</item>
		<item>
		<title>Be Secure form your side with Encrypted Connection Strings in Configuration Files</title>
		<link>http://vikasmehta.wordpress.com/2008/01/11/be-secure-form-your-side-with-encrypted-connection-strings-in-configuration-files/</link>
		<comments>http://vikasmehta.wordpress.com/2008/01/11/be-secure-form-your-side-with-encrypted-connection-strings-in-configuration-files/#comments</comments>
		<pubDate>Fri, 11 Jan 2008 09:46:18 +0000</pubDate>
		<dc:creator>vikasmehta</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Configuration Files]]></category>
		<category><![CDATA[Connection]]></category>
		<category><![CDATA[connectionStrings]]></category>
		<category><![CDATA[DPAPI]]></category>
		<category><![CDATA[Encrypted]]></category>
		<category><![CDATA[Strings]]></category>

		<guid isPermaLink="false">http://vikasmehta.wordpress.com/2008/01/11/be-secure-form-your-side-with-encrypted-connection-strings-in-configuration-files/</guid>
		<description><![CDATA[Introduction : Connection strings contain sensitive resource access credentials such as user names, passwords and server names. Connection strings stored in plaintext are dangerous, because an attacker that can compromise a server will be able to read those connection strings. Even if a machine is not compromised, connection strings stored in plain text are accessible [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vikasmehta.wordpress.com&amp;blog=1118965&amp;post=14&amp;subd=vikasmehta&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Introduction :</strong></p>
<p>Connection strings contain sensitive resource access credentials such as user names, passwords and server names. Connection strings stored in plaintext are dangerous, because an attacker that can compromise a server will be able to read those connection strings. Even if a machine is not compromised, connection strings stored in plain text are accessible to administrators and any other users with sufficient privileges on the host machine and/or Windows domain.<br />
How to do this everything&#8230;.!?!</p>
<p><strong>1. Choose the appropriate configuration provider.</strong> Under most circumstances DPAPI will suffice, although the RSA protected configuration is the logical choice in web farms where multiple servers are employed.</p>
<p><strong>2. Identify the configuration sections to be encrypted.</strong> Encrypting and decrypting data incurs performance overhead. To keep this overhead to a minimum, encrypt only the sections of the configuration file that store sensitive data.  Encrypt the &lt;connectionStrings&gt; element of the Web.config file to protect the database connection string.</p>
<p><strong>3. Choose the machine or user store.</strong> The DataProtectionConfigurationProvider supports machine-level and user-level stores for key storage. The choice of store depends largely on whether or not the application shares a server with other applications and whether or not sensitive data must be kept private for each application.</p>
<p><strong><em>Machine Store</em></strong></p>
<p>By default, the DataProtectionConfigurationProvider is configured to use DPAPI with the machine store. Use machine-level key storage in the following situations:</p>
<p>The application runs on its own dedicated server with no other applications.<br />
Multiple applications run on the same server and those applications need to be able to share sensitive information.<br />
To encrypt the connectionStrings section with the Machine Store, run the following command from a .NET command prompt:</p>
<p>aspnet_regiis -pe &#8220;connectionStrings&#8221; -app &#8220;/MachineDPAPI&#8221; -prov &#8220;DataProtectionConfigurationProvider&#8221;<br />
<strong><em>User Store</em></strong></p>
<p>Use user-level key storage if the application runs in a shared hosting environment and the application&#8217;s sensitive data should not be accessible to other applications on the server. In this situation, each application should run under a separate identity, and the resources for the application—such as files and databases—should be restricted to that identity.</p>
<p>To encrypt the connectionStrings section with the User Store, run the following command from a .NET command prompt:</p>
<p>   aspnet_regiis -pe &#8220;connectionStrings&#8221; -app &#8220;/UserDPAPI&#8221; -prov &#8220;MyUserDataProtectionConfigurationProvider&#8221;</p>
<p><strong>4.Encrypt the configuration file data.</strong></p>
<p>For those who using IIS</p>
<p>aspnet_regiis -pe &#8220;connectionStrings&#8221; -app &#8220;/MachineDPAPI&#8221; -prov &#8220;DataProtectionConfigurationProvider&#8221;</p>
<p>For those who using physical path.</p>
<p>aspnet_regiis.exe -pef &#8220;connectionStrings&#8221; C:\Projects\MachineDPAPI -prov &#8220;DataProtectionConfigurationProvider&#8221;<br />
<strong>Note :</strong> Encrypting connection strings with Aspnet_regiis does not change the code required to access the string because the decryption occurs automatically.so no need to include any further logic&#8230;!!!?</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/vikasmehta.wordpress.com/14/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/vikasmehta.wordpress.com/14/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vikasmehta.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vikasmehta.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vikasmehta.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vikasmehta.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vikasmehta.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vikasmehta.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vikasmehta.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vikasmehta.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vikasmehta.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vikasmehta.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vikasmehta.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vikasmehta.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vikasmehta.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vikasmehta.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vikasmehta.wordpress.com&amp;blog=1118965&amp;post=14&amp;subd=vikasmehta&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vikasmehta.wordpress.com/2008/01/11/be-secure-form-your-side-with-encrypted-connection-strings-in-configuration-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c6089d977563cf47ea42d8aead14aff3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vikasmehta</media:title>
		</media:content>
	</item>
		<item>
		<title>UrlReferrer. what is it&#8230;!??!</title>
		<link>http://vikasmehta.wordpress.com/2008/01/10/urlreferrer-what-is-it/</link>
		<comments>http://vikasmehta.wordpress.com/2008/01/10/urlreferrer-what-is-it/#comments</comments>
		<pubDate>Thu, 10 Jan 2008 07:25:55 +0000</pubDate>
		<dc:creator>vikasmehta</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://vikasmehta.wordpress.com/2008/01/10/urlreferrer-what-is-it/</guid>
		<description><![CDATA[In code you can see from which url the user came in the UrlReferrer property of the Request.. This always show the url of the last roundtrip, whether smartNavigation is switched on or off. So it will be the url of the page itself on a postback. On the first rendering of the page it [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vikasmehta.wordpress.com&amp;blog=1118965&amp;post=13&amp;subd=vikasmehta&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In code you can see from which url the user came in the UrlReferrer property of the Request.. This always show the url of the last roundtrip, whether smartNavigation is switched on or off. So it will be the url of the page itself on a postback. On the first rendering of the page it will contain the intended page the user came from.</p>
<p>Request.UrlReferrer.AbsoluteUri.Contains(&#8220;YourpageNameToCheck.aspx&#8221;) == true</p>
<p>{</p>
<p>          // your logic for validate the user.</p>
<p>}</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/vikasmehta.wordpress.com/13/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/vikasmehta.wordpress.com/13/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vikasmehta.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vikasmehta.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vikasmehta.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vikasmehta.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vikasmehta.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vikasmehta.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vikasmehta.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vikasmehta.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vikasmehta.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vikasmehta.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vikasmehta.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vikasmehta.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vikasmehta.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vikasmehta.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vikasmehta.wordpress.com&amp;blog=1118965&amp;post=13&amp;subd=vikasmehta&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vikasmehta.wordpress.com/2008/01/10/urlreferrer-what-is-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c6089d977563cf47ea42d8aead14aff3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vikasmehta</media:title>
		</media:content>
	</item>
	</channel>
</rss>
