<?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:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Thoughts Debugged</title>
	<atom:link href="http://chillicode.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://chillicode.wordpress.com</link>
	<description>Any sufficiently advanced technology is indistinguishable from Magic - Arthur C.Clarke</description>
	<lastBuildDate>Fri, 06 Nov 2009 11:00:12 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='chillicode.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/0cba9807279806a43efa4dd8f73ce2bc?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Thoughts Debugged</title>
		<link>http://chillicode.wordpress.com</link>
	</image>
			<item>
		<title>Converting ASP.NET Web Site to Web App</title>
		<link>http://chillicode.wordpress.com/2009/11/06/converting-asp-net-web-site-to-web-app/</link>
		<comments>http://chillicode.wordpress.com/2009/11/06/converting-asp-net-web-site-to-web-app/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 11:00:12 +0000</pubDate>
		<dc:creator>msvmuthu</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Web Site to Web App]]></category>
		<category><![CDATA[Webapp]]></category>
		<category><![CDATA[Website]]></category>

		<guid isPermaLink="false">http://chillicode.wordpress.com/2009/11/06/converting-asp-net-web-site-to-web-app/</guid>
		<description><![CDATA[There is a common mistake which almost most of us made when we&#160; created a new web site with Visual Studio 2005. The earlier version of Visual Studio 2005 does not include a template for web application. In other words, it was only possible to create website.
So why do you have to convert from website [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chillicode.wordpress.com&blog=7035872&post=174&subd=chillicode&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>There is a common mistake which almost most of us made when we&#160; created a new web site with Visual Studio 2005. The earlier version of Visual Studio 2005 does not include a template for web application. In other words, it was only possible to create website.</p>
<p>So why do you have to convert from website to web app first of all? Well there are quite a few reasons to list out:</p>
<table cellspacing="0" cellpadding="2" width="573" border="1">
<tbody>
<tr>
<td valign="top" width="143">&#160;</td>
<td valign="top" width="204">Web Site</td>
<td valign="top" width="224">Web App</td>
</tr>
<tr>
<td valign="top" width="148">Compilation of Markup</td>
<td valign="top" width="202">Dynamic</td>
<td valign="top" width="222">Dynamic</td>
</tr>
<tr>
<td valign="top" width="152">Compilation of code behind</td>
<td valign="top" width="201">dynamic by default; can pre -compile the site using 2 modes &#8211; batch mode (one assembly per folder) and fixed-names (one assembly for each page or user control; this may result in increased memory usage)</td>
<td valign="top" width="220">Precompiled; All code is compiled in to single assembly</td>
</tr>
<tr>
<td valign="top" width="155">Scope</td>
<td valign="top" width="201">Only code in App_Code is available to all classes; namespaces are not created by default</td>
<td valign="top" width="219">Since it is precompiled all page classes are in same assembly and are visible to all; namespace is created by default</td>
</tr>
<tr>
<td valign="top" width="156">File Structure</td>
<td valign="top" width="201">Just aggregates files in a directory so based on file system; project file list and other assembly list are present in web.config (which violates SoC)</td>
<td valign="top" width="220">has a neat project file which helps to have information of files and assemblies, helps in controlled build and deployment</td>
</tr>
</tbody>
</table>
<p>After reading the above difference website option may look evil; but that&#8217;s not the case. There are cases when website may come in to rescue. In fact we have been using web site for our application for a long time. And deployment was not a problem, we used NANT to compile the application (batch-mode) and used INSTALLSHIELD to deploy the application.</p>
<p>So when to use website or webapp project? There is an excellent article from <a href="http://msdn.microsoft.com/en-us/library/aa730880(VS.80).aspx" target="_blank">MSDN</a>:</p>
<p>&#160;</p>
<table cellspacing="0" cellpadding="2" width="564" border="1">
<tbody>
<tr>
<td valign="top" width="289">Task</td>
<td valign="top" width="124">Web application projects</td>
<td valign="top" width="149">Web site projects</td>
</tr>
<tr>
<td valign="top" width="280">Need to migrate large Visual Studio .NET 2003 applications</td>
<td valign="top" width="134">X</td>
<td valign="top" width="148">&#160;</td>
</tr>
<tr>
<td valign="top" width="275">Prefer single-page code model to code-behind model</td>
<td valign="top" width="141">&#160;</td>
<td valign="top" width="147">X</td>
</tr>
<tr>
<td valign="top" width="272">Prefer dynamic compilation and working on pages without building entire site on each page view (that is, save file and then simply refresh the page in the browser).</td>
<td valign="top" width="145">&#160;</td>
<td valign="top" width="146">X</td>
</tr>
<tr>
<td valign="top" width="271">Need to control names of output assemblies</td>
<td valign="top" width="147">X</td>
<td valign="top" width="146">&#160;</td>
</tr>
<tr>
<td valign="top" width="269">Need to generate one assembly for each page</td>
<td valign="top" width="149">&#160;</td>
<td valign="top" width="145">X</td>
</tr>
<tr>
<td valign="top" width="269">Need stand-alone classes to reference page and user control classes</td>
<td valign="top" width="150">X</td>
<td valign="top" width="145">&#160;</td>
</tr>
<tr>
<td valign="top" width="269">Need to build a Web application using multiple Web projects</td>
<td valign="top" width="150">X</td>
<td valign="top" width="145">&#160;</td>
</tr>
<tr>
<td valign="top" width="269">Need to add pre-build and post-build steps during compilation</td>
<td valign="top" width="150">X</td>
<td valign="top" width="145">&#160;</td>
</tr>
<tr>
<td valign="top" width="269">Want to open and edit any directory as a Web project without creating a project file</td>
<td valign="top" width="153">&#160;</td>
<td valign="top" width="148">X</td>
</tr>
</tbody>
</table>
<p>But after an over all comparison, Web Application looks more structured and gives us more control over the project. </p>
<p><u>How to convert a web site to web application?</u></p>
<p>ScotGu has given an excellent step-by-step <a href="http://webproject.scottgu.com/CSharp/Migration2/Migration2.aspx" target="_blank">approach</a> to convert a web site to web application. (In fact the Microsoft consultant who came to audit our project also gave the same printout as guidance). This is an excellent resource to start with. </p>
<p>While I did the conversion I took notice of some points that are worth mentioning in addition to Scottgu&#8217;s list.</p>
<p><u>Pre-Requisites:</u></p>
<ol>
<li>Visual Studio 2005 does not have an option for web application project. The web application project template was later added to the visual studio in Visual Studio 2005 SP1.Please read here for What is <a href="http://msdn.microsoft.com/en-us/library/88fx1xy0(VS.80).aspx" target="_blank">new</a> in Visual Studio 2005 SP1? Web application projects is one among them.</li>
<li>If you are installing VS 2005 SP1 on Windows 2003 server you may get a weird error &quot;The installation source for this product is not available&quot;. You must install a <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=8EFFE1D9-7224-4586-BE2B-42C9AE5B9071&amp;displaylang=en" target="_blank">hotfix</a> to fix this.</li>
<li>So install the hot fix (point 2), restart the machine and then install VS 2005 SP1.</li>
</ol>
<ol>Also see ScottGu&#8217;s <a href="http://weblogs.asp.net/scottgu/archive/2006/12/15/visual-studio-2005-service-pack-1-sp1-released.aspx" target="_blank">suggestions</a> on installing the service pack.</ol>
<p><u>Steps in conversion:</u></p>
<ol>
<li>Create a web application project.</li>
<li>Add reference to all of your dlls.</li>
<li>Copy the files to the folder except web.config file</li>
<li>Remember there is no App_Code in web application. So any classes in the app_code will not be visible to other classes in the project. This will break the build. To avoid this as a quick and effective fix, add a namespace to your classes in App_Code. And replace this class name with the fully qualified class name (with the newly added namespace) through out the project. (Of course not in the original class file in app_code). Renamed the app_code folder to something like Shared_Classes or something; this would avoid confusion.</li>
<li>Change the Build Action to &lt;compile&gt; for all the classes in App_Code.</li>
<li>Convert to Web Application.</li>
<li><a href="http://chillicode.files.wordpress.com/2009/11/image.png"><img title="image" style="border-right:0;border-top:0;display:inline;border-left:0;border-bottom:0;" height="282" alt="image" src="http://chillicode.files.wordpress.com/2009/11/image_thumb.png?w=404&#038;h=282" width="404" border="0" /></a> </li>
<li>When the convert to web application is being done the conversion may fail for some aspx files that use user controls that reside in the same directory and the same user control is also registered in the web.config file. Actually the creation of designer file may fail because of this error: tag has already been registered. To avoid this: register the user control in the problematic ascx page but choose a different TagPrefix (different from the one you have already registered in web.config file). For example:</li>
</ol>
<p>These are few additional things I noticed while converting the project from web application to web site. Hope this helps!</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/chillicode.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/chillicode.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/chillicode.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/chillicode.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/chillicode.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/chillicode.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/chillicode.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/chillicode.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/chillicode.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/chillicode.wordpress.com/174/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chillicode.wordpress.com&blog=7035872&post=174&subd=chillicode&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://chillicode.wordpress.com/2009/11/06/converting-asp-net-web-site-to-web-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/ff410cc7807f2dfa34cd272445da8d2e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Muthu MSV</media:title>
		</media:content>

		<media:content url="http://chillicode.files.wordpress.com/2009/11/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>How Fitzpatrick tricked AOL?</title>
		<link>http://chillicode.wordpress.com/2009/11/03/how-fitzpatrick-tricked-aol/</link>
		<comments>http://chillicode.wordpress.com/2009/11/03/how-fitzpatrick-tricked-aol/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 05:37:06 +0000</pubDate>
		<dc:creator>msvmuthu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://chillicode.wordpress.com/2009/11/03/how-fitzpatrick-tricked-aol/</guid>
		<description><![CDATA[Smart as hell! 
Fitzpatrick: Yeah, I worked at Tektronix for a while. Before I had any official job, I got some hosting account. I got kicked off of AOL for writing bots, flooding their chat rooms, and just being annoying.I was scripting the AOL client from another Windows program. I also wrote a bot to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chillicode.wordpress.com&blog=7035872&post=171&subd=chillicode&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Smart as hell! </p>
<p>Fitzpatrick: Yeah, I worked at Tektronix for a while. Before I had any official job, I got some hosting account. I got kicked off of AOL for writing bots, flooding their chat rooms, and just being annoying.I was scripting the AOL client from another Windows program. I also wrote a bot to flood their online form to send you a CD. I used a variation of my name, because I didn&#8217;t want their duplicate suppression to only send me one CD, because they had those 100 free hours, or 5000 free hours. I submitted this form a couple thousand times and for a week or so the postman would be coming with bundles of CDs wrapped up. </p>
<p>My mom was like,&quot;Damn it, Brad, you&#8217;re going to get in trouble&quot; I was like&quot;Er-their fault right?&quot;. Then one day I get a phone call and I actually picked up the phone, which I normally didn&#8217;t, and it was someone from AOL. They were just screaming at me. &quot;Stop sending us all these from submissions&quot;. I am not normally this quick and clever, but I just yelled back,&quot;Why are you sending me all this crap? Every day the postman comes! He&#8217;s dropping off all these CDs&quot; They are like &quot;We are so sorry sir. It wont happen again&quot; </p>
<p>- From <a href="http://www.amazon.com/Coders-at-Work-Peter-Seibel/dp/1430219483/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1257226525&amp;sr=1-1" target="_blank">Coders at Work</a>    <br />**</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/chillicode.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/chillicode.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/chillicode.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/chillicode.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/chillicode.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/chillicode.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/chillicode.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/chillicode.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/chillicode.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/chillicode.wordpress.com/171/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chillicode.wordpress.com&blog=7035872&post=171&subd=chillicode&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://chillicode.wordpress.com/2009/11/03/how-fitzpatrick-tricked-aol/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/ff410cc7807f2dfa34cd272445da8d2e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Muthu MSV</media:title>
		</media:content>
	</item>
		<item>
		<title>Dynamic Queries, Stored Procedures and SQL Injections</title>
		<link>http://chillicode.wordpress.com/2009/10/28/dynamic-queries-stored-procedures-and-sql-injections/</link>
		<comments>http://chillicode.wordpress.com/2009/10/28/dynamic-queries-stored-procedures-and-sql-injections/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 09:21:05 +0000</pubDate>
		<dc:creator>msvmuthu</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Server2008]]></category>
		<category><![CDATA[Dynamic Queries]]></category>
		<category><![CDATA[Dynamic Query]]></category>
		<category><![CDATA[exec]]></category>
		<category><![CDATA[sp_executesql]]></category>
		<category><![CDATA[SQL injection]]></category>
		<category><![CDATA[Stored Procedure]]></category>

		<guid isPermaLink="false">http://chillicode.wordpress.com/2009/10/28/dynamic-queries-stored-procedures-and-sql-injections/</guid>
		<description><![CDATA[As every one knows that Ad hoc dynamic queries are prone to SQL Injection attacks, I am not going to touch that. But there is still some confusion hanging over usage of dynamic sql with in a stored procedure. This is what I thought of blogging about.
Point 1: Using dynamic SQL with in stored procedure [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chillicode.wordpress.com&blog=7035872&post=168&subd=chillicode&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>As every one knows that Ad hoc dynamic queries are prone to <a href="http://technet.microsoft.com/en-us/library/ms161953.aspx" target="_blank">SQL Injection</a> attacks, I am not going to touch that. But there is still some confusion hanging over usage of dynamic sql with in a stored procedure. This is what I thought of blogging about.</p>
<p><span style="text-decoration:underline;">Point 1</span>: Using dynamic SQL with in stored procedure are prone to SQL Injection attack.</p>
<p>Other disadvantages of using dynamic SQL includes:</p>
<ol>
<li>Not readable and there for un maintainable code.</li>
<li>Execution path is not saved there fore every time a stored procedure is run execution path is calculated again and again.</li>
</ol>
<ol>But there are cases when we might need to use dynamic queries inside a stored procedure. What have to be done in this case?</ol>
<ol>To demonstrate the sql injection attacks and to give a sample how to avoid this, I created a table named test with just one column [name].</ol>
<ol>
<blockquote><p><span style="text-decoration:underline;">Table Definition</span></p>
<p>USE [ASPNETDEV]<br />
GO<br />
/****** Object:  Table [dbo].[test1]    Script Date: 10/28/2009 15:14:07 ******/<br />
SET ANSI_NULLS ON<br />
GO<br />
SET QUOTED_IDENTIFIER ON<br />
GO<br />
CREATE TABLE [dbo].[test](<br />
    [name] [nchar](10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL<br />
) ON [PRIMARY]</p></blockquote>
<p>Insert the below values in to the table.</ol>
<ol>
<blockquote><p>insert into test values (&#8216;muthu&#8217;);</p>
<p>insert into test values (&#8216;muthu1&#8242;);</p></blockquote>
</ol>
<p><strong><span style="text-decoration:underline;">Case 1: Procedure using static query </span></strong></p>
<blockquote><p>create procedure testsi<br />
(@name nvarchar(10))<br />
as<br />
select * from test where [name]=@name</p></blockquote>
<p>when we execute the above procedure with normal parameters (‘muthu’) it brings just 1 row.</p>
<blockquote><p><strong>exec</strong> testsi &#8216;muthu&#8217;</p></blockquote>
<p>Now I give a value that introduces SQL injection as below</p>
<blockquote><p><strong>exec </strong>testsi <strong><em>&#8216;muthu&#8221;;drop table test;&#8211;&#8217;&#8217;select * from test;&#8217;</em></strong></p></blockquote>
<p>When you look in to the value passed to the parameter <em>@name ; </em>you can very well see the SQL injection in the form of &#8216;’<em>;drop table test;—. </em>As you see, this  just closes the single quote and drops the table test. Well this is sql injection.</p>
<p>But to our surprise executing this does not drop the table and promptly brings in one row.</p>
<blockquote><p>muthu</p></blockquote>
<p>Because what we passed is just a value for the column [name] and obviously we don’t have any row in the table [test] with the column [name] having value <strong><em>&#8216;muthu&#8221;;drop table test;&#8211;&#8217;&#8217;select * from test;&#8217;</em></strong></p>
<p><strong><span style="text-decoration:underline;">Case 2: Procedure with dynamic Query</span></strong> </p>
<blockquote><p>create procedure testsid<br />
(@name nvarchar(1000))<br />
as<br />
declare @sql as nvarchar(1000)<br />
<strong>set @sql=&#8217;select * from test where [name]=&#8221;&#8217; + @name + &#8221;&#8221;<br />
</strong>print @sql<br />
execute (@sql)</p></blockquote>
<p>The line given in bold is the place where we use dynamic query.</p>
<p>Now lets execute this procedure using our SQL Injection value.</p>
<blockquote><p><strong>exec</strong> <strong><em>testsid</em></strong> <span style="color:#ff0000;">&#8216;muthu&#8221;;drop table test;&#8211;&#8217;&#8217;select * from test;&#8217;</span></p></blockquote>
<p>Opps! Now the table is lost.</p>
<p>when you see the “Messages” tab in the Management Studio to your surprise it will be as follows:</p>
<blockquote><p><strong>select * from test where [name]=&#8217;muthu&#8217;;drop table test;&#8211;&#8217;select * from test;&#8217; </strong></p>
<p>(1 row(s) affected)</p></blockquote>
<p>When you separate the statement using semicolon you will get 2 statements as follows; never mind the third one is commented.</p>
<ol>
<li>select * from test where [name]=&#8217;muthu&#8217;;</li>
<li>drop table test;</li>
<li>&#8211;&#8217;select * from test;&#8217;</li>
</ol>
<p>So this is SQL injection and this doesn’t just disappear if you use stored procedure.</p>
<p><strong><span style="text-decoration:underline;">Case 3: Procedure with dynamic query and avoiding SQL injection</span></strong></p>
<p>However Microsoft has introduced a new way to run dynamic queries from the stored procedure using <a href="http://technet.microsoft.com/en-us/library/ms188001.aspx" target="_blank">sp_executesql</a>.</p>
<blockquote><p><span style="text-decoration:underline;"><strong>From <a href="http://msdn.microsoft.com/en-us/library/ms175170.aspx" target="_blank">MSDN</a>:</strong></span></p>
<p>To execute a string, we recommend that you use the sp_executesql stored procedure instead of the EXECUTE statement. Because this stored procedure supports parameter substitution, sp_executesql is more versatile than EXECUTE; and because <strong>sp_executesql generates execution plans that are more likely to be reused by SQL Server, sp_executesql is more efficient than EXECUTE.</strong></p>
<p>&nbsp;</p>
</blockquote>
<p>Please refer to the SQL server 2008 books online to get more information about this sp_executesql.</p>
<blockquote><p>alter procedure testside<br />
(@name nvarchar(1000))<br />
as<br />
declare @sql as nvarchar(1000)<br />
declare @ParamDefinition nvarchar(500)<br />
<span style="color:#0000ff;"><strong>set @ParamDefinition = N&#8217;@name nvarchar(1000)&#8217;<br />
</strong></span>set @sql=&#8217;select * from test where [name]=@name&#8217;</p>
<p><strong>exec <span style="color:#ff0000;">sp_executesql</span> @sql, <span style="color:#0000ff;">@ParamDefinition</span>,@name </strong></p>
<p>print @sql</p></blockquote>
<p>In the above procedure we create a dynamic parameterized  query and we pass the query, the parameter definition and the value for the parameter to sp_excutesql procedure.</p>
<blockquote><p><strong>exec</strong> testside &#8216;muthu&#8221;;drop table test;&#8211;&#8217;&#8217;select * from test;&#8217;</p></blockquote>
<p>Even though we run the procedure with SQL Injection values to our surprise the table test does not get dropped.</p>
<p>But remember just using sp_executesql will not avoid sql injection attacks. It must be used sensibly. For example an example as follows is still susceptible to sql injection.</p>
<blockquote><p><span style="text-decoration:underline;"><strong>How not to use sp_executesql?</strong></span></p>
<p>create procedure testsides<br />
(@name nvarchar(1000))<br />
as<br />
declare @sql as nvarchar(1000)<br />
declare @ParamDefinition nvarchar(500)<br />
set @ParamDefinition = N&#8217;@name nvarchar(1000)&#8217;<br />
<span style="color:#ff0000;">set @sql=&#8217;select * from test where [name]=&#8221;&#8217; + @name + &#8221;&#8221;<br />
</span>exec sp_executesql @sql, @ParamDefinition,@name</p>
<p>print @sql</p></blockquote>
<p>Even though the procedure uses “sp_executesql” it is still prone to SQL injection because it does not use parameterized query.</p>
<p>But there are times when one cannot use parameterized queries, in this case there is no way but to use dynamic query. But in this case one must take extra-ordinary steps to validate the data. This <a href="http://msdn.microsoft.com/en-us/magazine/cc163523.aspx" target="_blank">article</a> may help further understanding.</p>
<p><span style="text-decoration:underline;">Update:</span></p>
<p>A <a href="http://www.thetechherald.com/article.php/200944/4682/Researcher-discloses-SQL-Injection-flaw-on-barackobama-com-Update-2">live example </a>for sql injection attack: Barackobama.com!</p>
<p><a href="http://www.thetechherald.com/article.php/200944/4682/Researcher-discloses-SQL-Injection-flaw-on-barackobama-com-Update-2"></a></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/chillicode.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/chillicode.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/chillicode.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/chillicode.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/chillicode.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/chillicode.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/chillicode.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/chillicode.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/chillicode.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/chillicode.wordpress.com/168/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chillicode.wordpress.com&blog=7035872&post=168&subd=chillicode&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://chillicode.wordpress.com/2009/10/28/dynamic-queries-stored-procedures-and-sql-injections/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/ff410cc7807f2dfa34cd272445da8d2e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Muthu MSV</media:title>
		</media:content>
	</item>
		<item>
		<title>Moving ASP.NET web application from 32 bit to 64 bit</title>
		<link>http://chillicode.wordpress.com/2009/10/26/moving-asp-net-web-application-from-32-bit-to-64-bit/</link>
		<comments>http://chillicode.wordpress.com/2009/10/26/moving-asp-net-web-application-from-32-bit-to-64-bit/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 09:57:15 +0000</pubDate>
		<dc:creator>msvmuthu</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[64 bit]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Architecture]]></category>
		<category><![CDATA[CLR]]></category>
		<category><![CDATA[.net 64 bit]]></category>
		<category><![CDATA[moving from 32 bit to 64 bit]]></category>
		<category><![CDATA[x64]]></category>

		<guid isPermaLink="false">http://chillicode.wordpress.com/2009/10/26/moving-asp-net-web-application-from-32-bit-to-64-bit/</guid>
		<description><![CDATA[Before we jump in to the details, we need to know few things to understand some basics. 
Managed module is a standard 32 bit Microsoft Windows Portable Executable (PE32) file or standard 64 bit Microsoft Windows Portable Executable file (PE32+) that requires CLR to execute.
Parts of managed module:



PE32 or PE32+ header

Contains information about   [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chillicode.wordpress.com&blog=7035872&post=167&subd=chillicode&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Before we jump in to the details, we need to know few things to understand some basics. </p>
<p>Managed module is a standard 32 bit Microsoft Windows Portable Executable (PE32) file or standard 64 bit Microsoft Windows Portable Executable file (PE32+) that requires CLR to execute.</p>
<p><strong><u>Parts of managed module:</u></strong></p>
<table cellspacing="0" cellpadding="2" width="561" border="0">
<tbody>
<tr>
<td valign="top" width="124">PE32 or PE32+ header</td>
<td valign="top" width="435">
<p>Contains information about           <br />1.&#160;&#160;&#160; format of the file (PE32 or PE32+)            <br />2.&#160;&#160;&#160; type of the file (DLL, CUI or GUI)            <br />3.&#160;&#160;&#160; a timestamp: the time when the file is built.            <br />4.&#160;&#160;&#160; Information about native CPU code (if the module contain native CPU code)            <br />For modules that has only IL this information is not used</p>
</td>
</tr>
<tr>
<td valign="top" width="124">CLR header</td>
<td valign="top" width="435">
<p>This includes information about           <br />1.&#160;&#160;&#160; Version of the CLR required            <br />2.&#160;&#160;&#160; MethodDef metadata token of the managed module’s entry point            <br />3.&#160;&#160;&#160; Location of Metadata and size of metadata            <br />4.&#160;&#160;&#160; resources            <br />5.&#160;&#160;&#160; strong name</p>
</td>
</tr>
<tr>
<td valign="top" width="124">Metadata</td>
<td valign="top" width="435">
<p>Usually this part contains 2 tables           <br />1.&#160;&#160;&#160; information about the types and members defined in the module’s source            <br />2.&#160;&#160;&#160; information about the types and members referred by the module’s source.</p>
</td>
</tr>
<tr>
<td valign="top" width="124">Intermediate          <br />Language code</td>
<td valign="top" width="435">Code produced by compiler during compilation. At run time CLR compiles the IL in to native CPU instructions.</td>
</tr>
</tbody>
</table>
<p>&#160;</p>
<p>Always keep in mind that all CLR complaint compilers produce IL code. At times this IL code is referred as managed code because it is managed by CLR. </p>
<table cellspacing="0" cellpadding="2" width="565" border="0">
<tbody>
<tr>
<td valign="top" width="89">Assembly</td>
<td valign="top" width="474">Assembly is a logical group of one or mode modules</td>
</tr>
<tr>
<td valign="top" width="89">Manifest </td>
<td valign="top" width="474">Manifest is a set of metadata tables that have information about list of files in the assembly, the dependencies of the files in the assembly and resource or data files associated with the files</td>
</tr>
</tbody>
</table>
<p>&#160;</p>
<p>Before we understand how CLR loads the managed code or assembly we need to study the difference between 32 bit and 64 bit versions of windows. </p>
<p><strong><em><font color="#004000">If your assembly files contain only type-safe managed code, you are writing code that should work on both 32-bit and 64-bit versions of Windows. No source code changes are required for your code to run on either version of Windows. In fact, the resulting EXE/DLL file produced by the compiler will run on 32-bit Windows as well as the x64 and IA64 versions of 64-bit Windows! In other words, the one file will run on any machine that has a version of the .NET Framework installed on it. </font></em></strong></p>
<p>On extremely rare occasions, developers want to write code that works only on a specific version of Windows. Developers might do this when using unsafe code or when interoperating with unmanaged code that is targeted to a specific CPU architecture. </p>
<blockquote><p><strong><u>What is Unsafe Code?</u></strong>      <br /><a href="http://msdn.microsoft.com/en-us/library/62bwd2yd(VS.80).aspx">http://msdn.microsoft.com/en-us/library/62bwd2yd(VS.80).aspx</a></p>
<p>By default Microsoft’s C# compiler produces safe code. Safe code is code that is verifiably safe. However it is possible to write unsafe code. Unsafe code is allowed to work directly with memory addresses and can manipulate bytes at these addresses. This is a powerful feature and is useful when interoperating with unmanaged code. </p>
<p>How to check if an assembly is type safe or not?     <br />Microsoft supplies a utility called PEVerify.exe that analyses and reports the error if any unsafe code is used in the assembly.</p>
<p><a href="http://chillicode.files.wordpress.com/2009/10/image12.png"><img title="image" style="border-right:0;border-top:0;display:inline;border-left:0;border-bottom:0;" height="37" alt="image" src="http://chillicode.files.wordpress.com/2009/10/image_thumb12.png?w=539&#038;h=37" width="539" border="0" /></a></p>
<p>&#160; </p>
</blockquote>
</p>
<p>To aid these developers,the C# compiler offers a /platform command-line switch. This switch allows you to specify whether the resulting assembly can run on x86 machines running 32-bit Windows versions only, x64 machines running 64-bit Windows only, or Intel Itanium machines running 64-bit Windows only. If you don&#8217;t specify a platform, the default is <em><strong>anycpu</strong></em>, which indicates that the resulting assembly can run on any version of Windows.</p>
<p>Depending on the platform switch, the C# compiler will emit an assembly that contains either a PE32 or PE32+ header, and the compiler will also emit the desired CPU architecture (or agnostic) into the header as well. Microsoft ships two command-line utilities, DumpBin.exe and CorFlags.exe, which you can use to examine the header information emitted in a managed module by the compiler.</p>
<blockquote><p><strong><u>How to find Platform dependency?</u></strong></p>
<p><a href="http://chillicode.files.wordpress.com/2009/10/image13.png"><img title="image" style="border-right:0;border-top:0;display:inline;border-left:0;border-bottom:0;" height="123" alt="image" src="http://chillicode.files.wordpress.com/2009/10/image_thumb13.png?w=527&#038;h=123" width="527" border="0" /></a> </p>
<table cellspacing="0" cellpadding="2" width="535" border="0">
<tbody>
<tr>
<td valign="top" width="102">CLR Header</td>
<td valign="top" width="431">
<p>2.0 = .NET 1.0 or 1.1             <br />2.5 = .NET 2.0</p>
</td>
</tr>
<tr>
<td valign="top" width="102">PE</td>
<td valign="top" width="431">
<p>PE header type             <br />PE32 = 32-bit              <br />PE32+ = 64-bit</p>
</td>
</tr>
<tr>
<td valign="top" width="102">CorFlags</td>
<td valign="top" width="431">Different flags</td>
</tr>
<tr>
<td valign="top" width="102">ILONLY</td>
<td valign="top" width="431">Since assembly also allowed to contain native code, to be “AnyCPU” the assembly shall contain only IL.</td>
</tr>
<tr>
<td valign="top" width="102">32BIT</td>
<td valign="top" width="431">
<p>1 = x86 target             <br />0 = Any CPU target</p>
</td>
</tr>
<tr>
<td valign="top" width="102">Signed</td>
<td valign="top" width="431">
<p>Signed&#160;&#160;&#160; 1 = Assembly signed             <br />0 = Assembly not signed</p>
</td>
</tr>
</tbody>
</table>
<p>In our example we will have to look at three properties to find if the assembly is platform dependent or not.     <br />ILONLY &#8211;&gt; 1      <br />Even the assembly has only ILCode still it can be platform dependent. PE and 32 Bit properties help to get more information.      <br />PE &amp; 32 Bit –&gt; PE32 &amp; 0      </p>
<p><em>The combination of PE &amp; 32 bit for different platforms are as follows:</em></p>
<table cellspacing="0" cellpadding="2" width="400" border="0">
<tbody>
<tr>
<td valign="top" width="133">&#160;</td>
<td valign="top" width="133">PE</td>
<td valign="top" width="133">32Bit</td>
</tr>
<tr>
<td valign="top" width="133">AnyCPU</td>
<td valign="top" width="133">PE32</td>
<td valign="top" width="133">0</td>
</tr>
<tr>
<td valign="top" width="133">X86</td>
<td valign="top" width="133">PE32</td>
<td valign="top" width="133">1</td>
</tr>
<tr>
<td valign="top" width="133">x64</td>
<td valign="top" width="133">PE32(+)</td>
<td valign="top" width="133">0</td>
</tr>
</tbody>
</table>
<p>So from the information displayed by CorFlags, our test assembly is truly “AnyCPU” </p>
<p>Also CorFlags can be used to forcefully change the PE headers. But personally I don’t like this because if it is compiled like that then it is done for a reason.</p>
</blockquote>
<p>&#160;</p>
<p><strong><u>What happens during running of the executable?</u></strong>    <br />1.&#160;&#160;&#160; Windows examines the EXE file’s header to determine whether the application requires a 32 bit or 64 bit address space    <br />2.&#160;&#160;&#160; A file with PE32 header can run with a 32 bit or 64 bit address space    <br />3.&#160;&#160;&#160; A file with PE32+ header requires a 64 bit address space    <br />4.&#160;&#160;&#160; Windows also checks the CPU architecture information embedded inside the header to ensure that it matches the CPU type in computer.</p>
<blockquote><p><strong><u>WOW64         <br /></u></strong>64 bit versions of windows offer a technology that allows 32 bit windows applications to run. This technology is called WOW64 (for windows on Windows 64).It would be more appropriate if it was named as ‘Windows 32 on Windows 64”. To make it simple, WOW64 acts as a layer and let 32 bit process to run as if they are running in 32 bit system even though in real they are running in 64 bit OS. As you see there is an extra cost here. There is no free lunch. </p>
<p>The even allows 32 bit applications with x86 native code in them to run on an Itanium machine, because WOW technology can emulate X86 instruction set, but with a performance cost. </p>
<p><strong><u>How do we know if the application is running under WOW64?</u></strong>      <br />In the task manager if you see *32 near to your image name then your application is running under 32 bit emulation mode using WOW64. If you want to determine it from out of process use IsWow64Process. </p>
<p>Also you could use Module.<a href="http://msdn.microsoft.com/en-us/library/system.reflection.module.getpekind(VS.80).aspx" target="_blank">GetPEKind</a> to determine the platform targeted by the module.       </p>
</blockquote>
<table cellspacing="0" cellpadding="2" width="606" border="0">
<tbody>
<tr>
<td valign="top" width="80">
<p><strong>/platform              <br />Switch</strong></p>
</td>
<td valign="top" width="97"><strong>Resulting managed module</strong></td>
<td valign="top" width="113"><strong>X86 Windows</strong></td>
<td valign="top" width="160"><strong>X64 Windows </strong></td>
<td valign="top" width="154"><strong>IA64 Windows</strong></td>
</tr>
<tr>
<td valign="top" width="80">anycpu</td>
<td valign="top" width="97">PE32/platform agnostic</td>
<td valign="top" width="113">Runs as a 32 bit application</td>
<td valign="top" width="160">Runs as 64 bit application</td>
<td valign="top" width="154">Runs as a 64 bit applications</td>
</tr>
<tr>
<td valign="top" width="80">X86</td>
<td valign="top" width="97">PE32/X86</td>
<td valign="top" width="113">Runs as a 32 bit application</td>
<td valign="top" width="160">Runs as a WoW64 application</td>
<td valign="top" width="154">Runs as a WoW64 application</td>
</tr>
<tr>
<td valign="top" width="80">X64</td>
<td valign="top" width="97">PE32+/X64</td>
<td valign="top" width="113">Doesn’t run</td>
<td valign="top" width="160">Runs as a 64 bit application</td>
<td valign="top" width="154">Doesn’t run</td>
</tr>
<tr>
<td valign="top" width="80">Itanium</td>
<td valign="top" width="97">PE32+/Itanium</td>
<td valign="top" width="113">Doesn’t run</td>
<td valign="top" width="160">Doesn’t run</td>
<td valign="top" width="154">Runs as a 64 bit application</td>
</tr>
</tbody>
</table>
<p><strong><u>Where to set the /platform switch in VS</u></strong></p>
<p><a href="http://chillicode.files.wordpress.com/2009/10/image14.png"><img title="image" style="border-right:0;border-top:0;display:inline;border-left:0;border-bottom:0;" height="353" alt="image" src="http://chillicode.files.wordpress.com/2009/10/image_thumb14.png?w=504&#038;h=353" width="504" border="0" /></a> </p>
<p><strong><u>Process of creating a Process</u></strong></p>
<p>After Windows has examined the EXE file&#8217;s header to determine whether to create a 32-bit process, a 64-bit process, or a WoW64 process, Windows loads the x86, x64, or IA64 version of MSCorEE.dll into the process&#8217;s address space. On an x86 version of Windows, the x86 version of MSCorEE.dll can be found in the C:\Windows\System32 directory. On an x64 or IA64 version of Windows, the x86 version of MSCorEE.dll can be found in the C:\Windows\SysWow64 directory, whereas the 64-bit version (x64 or IA64) can be found in the C:\Windows\System32 directory (for backward compatibility reasons). Then, the process&#8217; primary thread calls a method defined inside MSCorEE.dll. This method initializes the CLR, loads the EXE assembly, and then calls its entry point method (Main). At this point, the managed application is up and running. </p>
<p>So,</p>
<p>1.&#160;&#160;&#160; If your application has only managed code then you don’t hesitate to use “Any CPU”. Best option if you are just using pure c#.</p>
<p>2.&#160;&#160;&#160; If your application (or any of the third party dlls) has direct native code or have an assembly that is targeted to x86 (32) then you cannot run your application in X64 environment because when the dependent assembly (targeted to x86) could not be loaded in x64 environment (will throw bad format exception). In this case, use CorFlags tool to change the target to x64, if you are so sure that can be done!. Otherwise there is a <a href="http://www.dnjonline.com/article.aspx?ID=jun07_access3264" target="_blank">hack</a>. </p>
<p>3.&#160;&#160;&#160; If any of your code targets specifically x86 platform then you must compile targeting the platform x86. This will run in x64 in emulated mode (WoW64) but bear in mind that you have a performance hit in WoW64.</p>
<p>4.&#160;&#160;&#160; If any of your code targets specifically x64 platform (this wont occur normally until you have specific pointer sizes) then you got no choice except to compile your application targeting X64.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/chillicode.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/chillicode.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/chillicode.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/chillicode.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/chillicode.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/chillicode.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/chillicode.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/chillicode.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/chillicode.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/chillicode.wordpress.com/167/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chillicode.wordpress.com&blog=7035872&post=167&subd=chillicode&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://chillicode.wordpress.com/2009/10/26/moving-asp-net-web-application-from-32-bit-to-64-bit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/ff410cc7807f2dfa34cd272445da8d2e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Muthu MSV</media:title>
		</media:content>

		<media:content url="http://chillicode.files.wordpress.com/2009/10/image_thumb12.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://chillicode.files.wordpress.com/2009/10/image_thumb13.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://chillicode.files.wordpress.com/2009/10/image_thumb14.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>First Look : ASP.NET 4 Beta 2 and Ajax Preview 4.0</title>
		<link>http://chillicode.wordpress.com/2009/10/23/first-look-asp-net-4-beta-2-and-ajax-preview-4-0/</link>
		<comments>http://chillicode.wordpress.com/2009/10/23/first-look-asp-net-4-beta-2-and-ajax-preview-4-0/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 08:32:52 +0000</pubDate>
		<dc:creator>msvmuthu</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[ASP.NET 4.0]]></category>
		<category><![CDATA[ASPNET AJAX]]></category>
		<category><![CDATA[ASP.NET 4.0 Beta 2]]></category>
		<category><![CDATA[Microsoft Ajax 4.0]]></category>

		<guid isPermaLink="false">http://chillicode.wordpress.com/2009/10/23/first-look-asp-net-4-beta-2-and-ajax-preview-4-0/</guid>
		<description><![CDATA[I have just finished reading this white paper. I haven’t tried most of the things; but I wish to list some features which attracted me. 
I can see extensive changes in AJAX but apart from that there are some remarkable changes that would give us more control by letting us extend them. As Dino Esposito [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chillicode.wordpress.com&blog=7035872&post=160&subd=chillicode&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I have just finished reading this white <a href="http://www.asp.net/learn/whitepapers/aspnet4/default.aspx" target="_blank">paper</a>. I haven’t tried most of the things; but I wish to list some features which attracted me. </p>
<p>I can see extensive changes in AJAX but apart from that there are some remarkable changes that would give us more control by letting us extend them. As Dino Esposito says changes in ASP.NET 4.0 can be tagged as “More Control”.</p>
<p>The features I like in ASP.NET 4.0 Beta 2:</p>
<p><u><font color="#004040"><strong>Core Services</strong></font></u></p>
<p><strong><u>Auto-Start web application:</u> </strong></p>
<p><em><font color="#400000">A new scalability feature named auto-start that directly addresses this scenario is available when ASP.NET 4 runs on IIS 7.5 on Windows Server 2008 R2. The auto-start feature provides a controlled approach for starting up an application pool, initializing an ASP.NET application, and then accepting HTTP requests.</font></em></p>
<p><strong><u>Permanently redirecting a page:</u> </strong></p>
<p><em><font color="#400000">ASP.NET 4 adds a new RedirectPermanent helper method that makes it easy to issue HTTP 301 Moved Permanently responses rather than issuing HTTP 302 Found (Temporarily redirected) response which requires another round trip to the server</font>.</em></p>
<p><u><strong>Expanding the range of allowable URLs</strong>:</u><em><font color="#400000"> </font></em></p>
<p><em><font color="#400000">length of URL is no more limited to 260 and can customize the set of valid characters using the new requestPathInvalidChars attribute of the httpRuntime configuration element</font></em></p>
<p><u><strong>Compress Session State</strong>:</u> </p>
<p><font color="#400000"><em>When the compressionEnabled configuration option shown in the following example is set to true, ASP.NET will compress (and decompress) serialized session state by using the .NET Framework System.IO.Compression.GZipStream class. This is available only when out-of-process session is used.</em></font></p>
<p><font color="#400000"><em>Do you know it is possible to <a href="http://www.hanselman.com/blog/ZippingCompressingViewStateInASPNET.aspx" target="_blank">compress</a> for in-proc session storage scenario also – even in ASP.NET 2.0?</em></font></p>
<p><u><strong>Object Caching and Extensibility</strong>:</u></p>
<p><em><font color="#400000">To make caching available for all applications, the .NET Framework 4 introduces a new assembly, a new namespace, some base types, and a concrete caching implementation.&#160; The new System.Runtime.Caching.dll assembly contains a new caching API in the System.Runtime.Caching namespace.&#160; The namespace contains two core sets of classes:       <br />•&#160;&#160;&#160; Abstract types that provide the foundation for building any type of custom cache implementation.        <br />•&#160;&#160;&#160; A concrete in-memory object cache implementation (the System.Runtime.Caching.MemoryCache class).</font></em></p>
<p><u><strong>Extensible request validation:</strong></u></p>
<p><em><font color="#400000">The request validation feature has been made extensible so that we can use custom request-validation logic.(ASP.NET request validation searches incoming HTTP request data for strings that are commonly used in cross-site scripting (XSS) attacks)</font></em></p>
<p><u><strong>AJAX 4</strong></u></p>
<p><strong><u>Client Template rendering:</u></strong></p>
<p><em>Templates offer the most manageable way of creating UI from data.</em></p>
<blockquote><p>The following example shows a typical client template that we can create using ASP.NET AJAX 4.     <br />&lt;ul id=&quot;myTemplate&quot; class=&quot;sys-template&quot;      <br />&#160;&#160;&#160; sys:attach=&quot;dataview&quot;      <br />&gt;      <br />&#160;&#160;&#160;&#160; &lt;li&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;h3&gt;{{ Name }}&lt;/h3&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;div&gt;{{ Description }}&lt;/div&gt;      <br />&#160;&#160;&#160; &lt;/li&gt;      <br />&lt;/ul&gt;</p>
</blockquote>
<ol>
<ol>
<p>&#160;</p>
</ol>
</ol>
<p><u><strong>Data binding</strong> </u></p>
<p>One way live binding is what we saw in previous example {{ Description }}.</p>
<p>Two way live binding is useful when a text box is provided that enables users to modify the value of underlying data, as in the following example:    <br />&lt;input type=&quot;text&quot; value=&quot;{binding Name}&quot;/&gt;</p>
<p>In two-way live binding, the binding works in both directions. If the target value is changed (in this case, the value in the UI), the source value is automatically updated (in this case, the underlying data item). Similarly, if the source value is changed (in this case, if the underlying data value is updated externally), the target value (the value in the UI) is updated in response. As a result, target and source are always in sync. </p>
<p><u><strong>Observer Pattern</strong></u></p>
<p>The observer pattern enables an object to be notified about changes that occur in another object. (The term observer pattern is often misused in JavaScript frameworks to describe event handling based on the addHandler method and similar techniques.) ASP.NET AJAX 4 implements the pattern completely. It adds observer functionality to ordinary JavaScript objects or arrays so that they raise change notifications when they are modified through the Sys.Observer interface</p>
<p><strong><u>Client side controls</u></strong></p>
<p>The DataView control can bind to any JavaScript object or array, or to any ASP.NET AJAX component</p>
<p>An example:</p>
<blockquote><p>&lt;ul sys:attach=&quot;dataview&quot; class=&quot;sys-template&quot;     <br />&#160;&#160;&#160; <font color="#ff0000">dataview:data</font>=&quot;{{ imagesArray }}&quot;      <br />&gt;      <br />&#160;&#160;&#160; &lt;li&gt;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;h3&gt;{{ Name }}&lt;/h3&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;div&gt;{{ Description }}&lt;/div&gt;      <br />&#160;&#160;&#160; &lt;/li&gt;      <br />&lt;/ul&gt;</p>
</blockquote>
<p><u></u></p>
<p><u>End-to-end Ajax-based data scenarios:</u></p>
<p>The AdoNetServiceProxy class enables read-write interaction with ADO.NET Data Services from JavaScript. The class enables access from JavaScript to a broad range of features of ADO.NET Data Services. </p>
<p>The AdoNetServiceProxy class is used by the AdoNetDataContext class in read-write scenarios that provides full support for change tracking in the browser. This enables complete end-to-end AJAX-based data scenarios. </p>
<p>The following example shows how to use the DataContext class.</p>
<blockquote><p>&lt;script type=&quot;text/javascript&quot;&gt;      <br />&#160;&#160;&#160; var dataContext = new Sys.Data.DataContext();      <br />&#160;&#160;&#160; dataContext.set_serviceUri(&quot;../Services/imagesService.svc&quot;);      <br />&#160;&#160;&#160; dataContext.set_saveOperation(&quot;SaveImages&quot;);      <br />&#160;&#160;&#160; dataContext.initialize();      <br />&lt;/script&gt; </p>
<p>&lt;button onclick=&quot;dataContext.saveChanges()&quot; class=&quot;right&quot;&gt;Save Changes&lt;/button&gt; </p>
<p>&lt;ul sys:attach=&quot;dataview&quot; class=&quot;sys-template&quot;     <br />&#160;&#160;&#160; dataview:dataprovider=&quot;{{ dataContext }}&quot;      <br />&#160;&#160;&#160; dataview:query=&quot;GetImages&quot;      <br />&gt;      <br />&#160;&#160;&#160; &lt;li&gt;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;input type=&quot;text&quot; value=&quot;{binding Name}&quot;/&gt;&lt;br/&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;input type=&quot;text&quot; value=&quot;{binding Description}&quot;/&gt;      <br />&#160;&#160;&#160; &lt;/li&gt;      <br />&lt;/ul&gt;</p>
</blockquote>
<p><u>Web Form</u></p>
<p><strong><u>View state enable/disable for individual controls:</u></strong></p>
<p>All server controls have EnableViewState property including page. But one must remember that EnableViewState property is ignored for child controls. For example if Page has EnableViewState set to True,&#160; its child control TextBox control will always read and write to the session state no matter what we set for enableviewstate property for that control.</p>
<p>But ASP.NET 4.0 will change this behavior by using a special property named ViewStateMode that accepts 3 values: enabled|disabled|inherit.</p>
<p>This is a good improvement. </p>
<p><strong><u>Browser capabilities:</u></strong></p>
<p>ASP.NET 4 includes a feature referred to as browser capabilities providers. As the name suggests, this lets us build a provider that in turn lets us to use our own code to determine browser capabilities.</p>
<p><strong><u>Routing</u></strong></p>
<p>ASP.NET 4 adds built-in support for using routing with Web Forms. Routing lets us configure an application to accept request URLs that do not map to physical files. Instead, we can use routing to define URLs that are meaningful to users and that can help with search-engine optimization (SEO) for our application. For example, the URL for a page that displays product categories in an existing application might look like the following example:   <br /><a href="http://website/products.aspx?categoryid=12">http://website/products.aspx?categoryid=12</a>    <br />By using routing, we can configure the application to accept the following URL to render the same information:    <br /><a href="http://website/products/software">http://website/products/software</a></p>
<p><strong><u>Client ID creation</u></strong></p>
<p>The new ClientIDMode property addresses a long-standing issue in ASP.NET, namely how controls create the id attribute for elements that they render.</p>
<p>The new ClientIDMode property lets you specify more precisely how the client ID is generated for controls. You can set the ClientIDMode property for any control, including for the page. Possible settings are the following:   <br />•&#160;&#160;&#160; <em>AutoID</em> – This is equivalent to the algorithm for generating ClientID property values that was used in earlier versions of ASP.NET.    <br />•&#160;&#160;&#160; <em>Static</em> – This specifies that the ClientID value will be the same as the ID without concatenating the IDs of parent naming containers. This can be useful in Web user controls. Because a Web user control can be located on different pages and in different container controls, it can be difficult to write client script for controls that use the AutoID algorithm because you cannot predict what the ID values will be.     <br />•&#160;&#160;&#160; <em>Predictable</em> – This option is primarily for use in data controls that use repeating templates. It concatenates the ID properties of the control&#8217;s naming containers, but generated ClientID values do not contain strings like &quot;ctlxxx&quot;. This setting works in conjunction with the ClientIDRowSuffix property of the control. You set the ClientIDRowSuffix property to the name of a data field, and the value of that field is used as the suffix for the generated ClientID value. Typically you would use the primary key of a data record as the ClientIDRowSuffix value.    <br />•&#160;&#160; <em> Inherit</em> – This setting is the default behavior for controls; it specifies that a control&#8217;s ID generation is the same as its parent.</p>
<p><strong><u>Query Extender – Filtering</u></strong></p>
<p>To make data source filtering easier, a new QueryExtender control has been added in ASP.NET 4. This control can be added to EntityDataSource or LinqDataSource controls in order to filter the data returned by these controls. Because the QueryExtender control relies on LINQ, the filter is applied on the database server before the data is sent to the page, which results in very efficient operations. </p>
<p>The QueryExtender control supports a variety of filter options: Search,Range,Property Expression and CustomExpression.</p>
<p>More updates when I really work on them. Notify me incase if I had overlooked an important feature. </p>
<p>Happy learning! </p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/chillicode.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/chillicode.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/chillicode.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/chillicode.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/chillicode.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/chillicode.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/chillicode.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/chillicode.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/chillicode.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/chillicode.wordpress.com/160/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chillicode.wordpress.com&blog=7035872&post=160&subd=chillicode&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://chillicode.wordpress.com/2009/10/23/first-look-asp-net-4-beta-2-and-ajax-preview-4-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/ff410cc7807f2dfa34cd272445da8d2e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Muthu MSV</media:title>
		</media:content>
	</item>
		<item>
		<title>VS2008 Tips : Organize Usings</title>
		<link>http://chillicode.wordpress.com/2009/10/22/vs2008-tip-organize-usings/</link>
		<comments>http://chillicode.wordpress.com/2009/10/22/vs2008-tip-organize-usings/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 10:32:11 +0000</pubDate>
		<dc:creator>msvmuthu</dc:creator>
				<category><![CDATA[2008]]></category>
		<category><![CDATA[VisualStudio]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Visual Studio 2008]]></category>

		<guid isPermaLink="false">http://chillicode.wordpress.com/2009/10/22/vs2008-tip-organize-usings/</guid>
		<description><![CDATA[This was helpful for me manytimes and yet I have seen many developers who are not aware of this feature.

Select the using statements and right click and select Organize usings. There are 3 options available: Remove Unused Usings, Sort Usings and Remove and Sort usings.
After selecting “Remove and Sort Usings” my using statements got reduced [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chillicode.wordpress.com&blog=7035872&post=155&subd=chillicode&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This was helpful for me manytimes and yet I have seen many developers who are not aware of this feature.</p>
<p><a href="http://chillicode.files.wordpress.com/2009/10/image10.png"><img style="border-right:0;border-top:0;display:inline;border-left:0;border-bottom:0;" title="image" src="http://chillicode.files.wordpress.com/2009/10/image_thumb10.png?w=304&#038;h=266" border="0" alt="image" width="304" height="266" /></a></p>
<p>Select the using statements and right click and select Organize usings. There are 3 options available: Remove Unused Usings, Sort Usings and Remove and Sort usings.</p>
<p>After selecting “Remove and Sort Usings” my using statements got reduced to just 7.</p>
<p><a href="http://chillicode.files.wordpress.com/2009/10/image11.png"><img style="border-right:0;border-top:0;display:inline;border-left:0;border-bottom:0;" title="image" src="http://chillicode.files.wordpress.com/2009/10/image_thumb11.png?w=304&#038;h=126" border="0" alt="image" width="304" height="126" /></a></p>
<p> </p>
<p>Simple and nice feature, right?</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/chillicode.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/chillicode.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/chillicode.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/chillicode.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/chillicode.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/chillicode.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/chillicode.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/chillicode.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/chillicode.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/chillicode.wordpress.com/155/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chillicode.wordpress.com&blog=7035872&post=155&subd=chillicode&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://chillicode.wordpress.com/2009/10/22/vs2008-tip-organize-usings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/ff410cc7807f2dfa34cd272445da8d2e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Muthu MSV</media:title>
		</media:content>

		<media:content url="http://chillicode.files.wordpress.com/2009/10/image_thumb10.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://chillicode.files.wordpress.com/2009/10/image_thumb11.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>&#8220;Google&#8221;lable and &#8220;Bing&#8221;able Twitter</title>
		<link>http://chillicode.wordpress.com/2009/10/22/googlelable-and-bingable-twitter/</link>
		<comments>http://chillicode.wordpress.com/2009/10/22/googlelable-and-bingable-twitter/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 09:32:36 +0000</pubDate>
		<dc:creator>msvmuthu</dc:creator>
				<category><![CDATA[2.0]]></category>
		<category><![CDATA[Bing]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Search]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://chillicode.wordpress.com/2009/10/22/googlelable-and-bingable-twitter/</guid>
		<description><![CDATA[Google has reached an agreement with Twitter to include its updates in their search results. And Bing has also done the same kind of arrangements. This is a boost for Twitter and a very good news for us.
Only yesterday I wanted to search a blog post that was recommended by ScottGu. I didn’t remember the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chillicode.wordpress.com&blog=7035872&post=150&subd=chillicode&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Google has reached an <a href="http://googleblog.blogspot.com/2009/10/rt-google-tweets-and-updates-and-search.html" target="_blank">agreement</a> with Twitter to include its updates in their search results. And Bing has also done the same kind of arrangements. This is a boost for Twitter and a very good news for us.</p>
<p>Only yesterday I wanted to search a blog <a href="http://www.ronaldwidha.net/2009/10/18/10-features-why-asp-net-4-is-better-for-public-website/" target="_blank">post</a> that was recommended by ScottGu. I didn’t remember the URL for the recommended blogpost. I know the words “Top 10 features asp.net 4”. The company that I work for, has banned Twitter. I thought of a search service for Twitter provided by other search giants will be good. So now it is available.</p>
<p>I still don’t know how to use Google to search Twitter messages but Bing has already provided an interface to search the Tweets. </p>
<p><a href="http://chillicode.files.wordpress.com/2009/10/image7.png"><img title="image" style="display:inline;border-width:0;" height="174" alt="image" src="http://chillicode.files.wordpress.com/2009/10/image_thumb7.png?w=304&#038;h=174" width="304" border="0" /></a> </p>
<p>But searching for this tweet didn’t bring up any results.</p>
<p>I tried to search by last tweet: Singapore getting diluted. But no luck. Bing didn’t bring up any results either.</p>
<p><a href="http://chillicode.files.wordpress.com/2009/10/image8.png"><img title="image" style="display:inline;border-width:0;" height="172" alt="image" src="http://chillicode.files.wordpress.com/2009/10/image_thumb8.png?w=304&#038;h=172" width="304" border="0" /></a> </p>
<p>But a search on @ScottGu gave few results. </p>
<p><a href="http://chillicode.files.wordpress.com/2009/10/image9.png"><img title="image" style="display:inline;border-width:0;" height="146" alt="image" src="http://chillicode.files.wordpress.com/2009/10/image_thumb9.png?w=304&#038;h=146" width="304" border="0" /></a> </p>
<p>As I can see, these are the results on tweets about scottgu.</p>
<p>Finally I searched using Twitter <a href="http://search.twitter.com/search?q=10+features+why+asp.net+4+is+better" target="_blank">search</a> itself. And also my tweet on Singapore getting <a href="http://search.twitter.com/search?q=singapore+diluted" target="_blank">diluted</a>. Aha! The results are just fine. Hope the twitter search from Bing and Google will be OK very soon.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/chillicode.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/chillicode.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/chillicode.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/chillicode.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/chillicode.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/chillicode.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/chillicode.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/chillicode.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/chillicode.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/chillicode.wordpress.com/150/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chillicode.wordpress.com&blog=7035872&post=150&subd=chillicode&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://chillicode.wordpress.com/2009/10/22/googlelable-and-bingable-twitter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/ff410cc7807f2dfa34cd272445da8d2e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Muthu MSV</media:title>
		</media:content>

		<media:content url="http://chillicode.files.wordpress.com/2009/10/image_thumb7.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://chillicode.files.wordpress.com/2009/10/image_thumb8.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://chillicode.files.wordpress.com/2009/10/image_thumb9.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>API for Wolfram Alpha</title>
		<link>http://chillicode.wordpress.com/2009/10/16/api-for-wolfram-alpha/</link>
		<comments>http://chillicode.wordpress.com/2009/10/16/api-for-wolfram-alpha/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 07:23:05 +0000</pubDate>
		<dc:creator>msvmuthu</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Computational Engine]]></category>
		<category><![CDATA[Wolfram Alpha]]></category>

		<guid isPermaLink="false">http://chillicode.wordpress.com/2009/10/16/api-for-wolfram-alpha/</guid>
		<description><![CDATA[now what? Wolfram Alpha is releasing its API today. The API documentation will be available at http://products.wolframalpha.com/api.
I am particularly interested in this because an API for an engine that searches and computes data might be very helpful at times. The possibilities for applications could be endless. We just need imagination. 
I cannot wait to mess [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chillicode.wordpress.com&blog=7035872&post=143&subd=chillicode&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>now what? Wolfram Alpha is releasing its API today. The API documentation will be available at <a href="http://products.wolframalpha.com/api">http://products.wolframalpha.com/api</a>.</p>
<p>I am particularly interested in this because an API for an engine that searches and computes data might be very helpful at times. The possibilities for applications could be endless. We just need imagination. </p>
<p>I cannot wait to mess up with the API.</p>
<p>A simple search with term “<a href="http://www.wolframalpha.com/input/?i=uncertainity+principle" target="_blank">uncertainity principle</a>” gave me nice results, rather than giving me a link to a page that has the data.</p>
<p><a href="http://chillicode.files.wordpress.com/2009/10/image6.png"><img title="image" style="border-right:0;border-top:0;display:inline;border-left:0;border-bottom:0;" height="366" alt="image" src="http://chillicode.files.wordpress.com/2009/10/image_thumb6.png?w=404&#038;h=366" width="404" border="0" /></a> </p>
<p>I told you, you just need imagination!</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/chillicode.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/chillicode.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/chillicode.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/chillicode.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/chillicode.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/chillicode.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/chillicode.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/chillicode.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/chillicode.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/chillicode.wordpress.com/143/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chillicode.wordpress.com&blog=7035872&post=143&subd=chillicode&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://chillicode.wordpress.com/2009/10/16/api-for-wolfram-alpha/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/ff410cc7807f2dfa34cd272445da8d2e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Muthu MSV</media:title>
		</media:content>

		<media:content url="http://chillicode.files.wordpress.com/2009/10/image_thumb6.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Critical October Security patches</title>
		<link>http://chillicode.wordpress.com/2009/10/14/critical-october-security-patches/</link>
		<comments>http://chillicode.wordpress.com/2009/10/14/critical-october-security-patches/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 02:54:52 +0000</pubDate>
		<dc:creator>msvmuthu</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Browser]]></category>
		<category><![CDATA[CLR]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[DOTNET]]></category>
		<category><![CDATA[InternetExplorer]]></category>
		<category><![CDATA[Security Patch]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Vulnerabilities]]></category>

		<guid isPermaLink="false">http://chillicode.wordpress.com/2009/10/14/critical-october-security-patches/</guid>
		<description><![CDATA[Microsoft today released a huge security patch. This includes 13 fixes out of which 6 updates are given as critical and they have the highest priority.
 
As we see in the priority list given by Microsoft, half of the security patches has something to do with day to day activities of the users or at [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chillicode.wordpress.com&blog=7035872&post=140&subd=chillicode&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Microsoft today <a href="http://www.microsoft.com/technet/security/bulletin/ms09-oct.mspx" target="_blank">released</a> a huge security patch. This includes 13 fixes out of which 6 updates are given as critical and they have the highest priority.</p>
<p><a href="http://chillicode.files.wordpress.com/2009/10/image5.png"><img title="image" style="border-right:0;border-top:0;display:inline;border-left:0;border-bottom:0;" height="304" alt="image" src="http://chillicode.files.wordpress.com/2009/10/image_thumb5.png?w=510&#038;h=304" width="510" border="0" /></a> </p>
<p>As we see in the priority list given by Microsoft, half of the security patches has something to do with day to day activities of the users or at worst at the server level.</p>
<p>As a web developer I am really concerned about patches for <strong>Internet Explorer, .Net CLR and Silver light</strong>. As a normal user the patch for Media Runtime and Media Player interests me, because I download loads of media content.</p>
<p>Below are the critical patches as recommended by Microsoft.</p>
<table cellspacing="0" cellpadding="2" width="595" border="0">
<tbody>
<tr>
<td valign="top" width="74">
<p><a href="http://go.microsoft.com/fwlink/?LinkId=163913">MS09-052</a></p>
</td>
<td valign="top" width="519">
<p><b>Vulnerabilities in Windows Media Runtime Could Allow Remote Code Execution (975682)</b>            <br />This security update resolves two privately reported vulnerabilities in Windows Media Runtime. The vulnerabilities could allow remote code execution if a user opened a specially crafted media file or received specially crafted streaming content from a Web site or any application that delivers Web content. An attacker who successfully exploited these vulnerabilities could gain the same user rights as the local user. Users whose accounts are configured to have fewer user rights on the system could be less impacted than users who operate with administrative user rights.</p>
</td>
</tr>
<tr>
<td valign="top" width="74">
<p><a href="http://go.microsoft.com/fwlink/?LinkId=163970">MS09-050</a></p>
</td>
<td valign="top" width="519">
<p><b>Vulnerabilities in SMBv2 Could Allow Remote Code Execution (975517)</b>            <br />This security update resolves one publicly disclosed and two privately reported vulnerabilities in Server Message Block Version 2 (SMBv2). The most severe of the vulnerabilities could allow remote code execution if an attacker sent a specially crafted SMB packet to a computer running the Server service. Firewall best practices and standard default firewall configurations can help protect networks from attacks that originate from outside the enterprise perimeter. Best practices recommend that systems that are connected to the Internet have a minimal number of ports exposed. </p>
</td>
</tr>
<tr>
<td valign="top" width="74">
<p><a href="http://go.microsoft.com/fwlink/?LinkId=163979">MS09-054</a></p>
</td>
<td valign="top" width="519">
<p><b>Cumulative Security Update for Internet Explorer (974455)</b>            <br />This security update resolves three privately reported vulnerabilities and one publicly disclosed vulnerability in Internet Explorer. <strong><em><font color="#800040">The vulnerabilities could allow remote code execution if a user views a specially crafted Web page using Internet Explorer</font></em></strong>. Users whose accounts are configured to have fewer user rights on the system could be less impacted than users who operate with administrative user rights.</p>
</td>
</tr>
<tr>
<td valign="top" width="74">
<p><a href="http://go.microsoft.com/fwlink/?LinkId=160527">MS09-061</a></p>
</td>
<td valign="top" width="519">
<p><b>Vulnerabilities in the Microsoft .NET Common Language Runtime Could Allow Remote Code Execution (974378)</b>            <br />This security update resolves three privately reported vulnerabilities in Microsoft .NET Framework and Microsoft Silverlight. <strong><font color="#800040">The <em>vulnerabilities could allow remote code execution on a client system if a user views a specially crafted Web page using a Web browser that can run XAML Browser Applications (XBAPs) or Silverlight applications, or if an attacker succeeds in persuading a user to run a specially crafted Microsoft .NET application</em></font></strong>. Users whose accounts are configured to have fewer user rights on the system could be less impacted than users who operate with administrative user rights.<font color="#800040"><strong> <em>The vulnerabilities could also allow remote code execution on a server system running IIS, if that server allows processing ASP.NET pages and an attacker succeeds in uploading a specially crafted ASP.NET page to that server and executing it, as could be the case in a Web hosting scenario</em></strong></font>. Microsoft .NET applications, Silverlight applications, XBAPs and ASP.NET pages that are not malicious are not at risk of being compromised because of this vulnerability.</p>
</td>
</tr>
<tr>
<td valign="top" width="74">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=161342">MS09-062</a></p>
</td>
<td valign="top" width="519">
<p><b>Vulnerabilities in GDI+ Could Allow Remote Code Execution (957488)</b>            <br />This security update resolves several privately reported vulnerabilities in Microsoft Windows GDI+. These vulnerabilities could allow remote code execution if a user viewed a specially crafted image file using affected software or browsed a Web site that contains specially crafted content. Users whose accounts are configured to have fewer user rights on the system could be less impacted than users who operate with administrative user rights.</p>
</td>
</tr>
<tr>
<td valign="top" width="74">
<p><a href="http://go.microsoft.com/fwlink/?LinkId=163913">MS09-052</a></p>
</td>
<td valign="top" width="519">
<p><b>Vulnerability in Windows Media Player Could Allow Remote Code Execution (974112)</b>            <br />This security update resolves a privately reported vulnerability in Windows Media Player. The vulnerability could allow remote code execution if a specially crafted ASF file is played using Windows Media Player 6.4. <font color="#800040"><em><strong>An attacker who successfully exploited this vulnerability could gain the same user rights as the local user</strong></em></font>. Users whose accounts are configured to have fewer user rights on the system could be less impacted than users who operate with administrative user rights. </p>
</td>
</tr>
</tbody>
</table>
<p>Also to check for the missing security updates and misconfigurations we can use <a href="http://go.microsoft.com/fwlink/?LinkId=21134">Microsoft Baseline Security Analyzer</a>.</p>
<p>For MS09-061 the current vulnerabilities are explained <a href="http://www.vupen.com/english/advisories/2009/2896" target="_blank">here</a> as follows:</p>
<ol>
<li>The first issue results from the manner in which Microsoft .NET <strong>verifiable code</strong> is verified, which could allow attackers to obtain a managed pointer to stack memory that is no longer used, leading to arbitrary code execution.</li>
<li>The second vulnerability results from the manner in which Microsoft .NET <strong>verifiable code</strong> is verified, which could allow attackers to bypass a type equality check and execute arbitrary code.</li>
<li>The third issue results from the manner in which the Microsoft .NET Common Language Runtime (CLR) <strong>handles interfaces</strong>, which could allow attackers to execute arbitrary code via a malicious application.</li>
</ol>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/chillicode.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/chillicode.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/chillicode.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/chillicode.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/chillicode.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/chillicode.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/chillicode.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/chillicode.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/chillicode.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/chillicode.wordpress.com/140/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chillicode.wordpress.com&blog=7035872&post=140&subd=chillicode&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://chillicode.wordpress.com/2009/10/14/critical-october-security-patches/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/ff410cc7807f2dfa34cd272445da8d2e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Muthu MSV</media:title>
		</media:content>

		<media:content url="http://chillicode.files.wordpress.com/2009/10/image_thumb5.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Amazon&#8217;s way of disabling controls</title>
		<link>http://chillicode.wordpress.com/2009/10/13/amazons-way-of-disabling-controls/</link>
		<comments>http://chillicode.wordpress.com/2009/10/13/amazons-way-of-disabling-controls/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 10:09:15 +0000</pubDate>
		<dc:creator>msvmuthu</dc:creator>
				<category><![CDATA[Usability]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[Confessions of the public speaker]]></category>
		<category><![CDATA[Scott Berkun]]></category>
		<category><![CDATA[UI]]></category>
		<category><![CDATA[Web Usability]]></category>

		<guid isPermaLink="false">http://chillicode.wordpress.com/2009/10/13/amazons-way-of-disabling-controls/</guid>
		<description><![CDATA[Today I saw an interesting way to disable the button shown in the web UI. Today I was browsing Amazon and trying to pre-order a book named “Confessions of the public speaker” written by Scott Berkun. I haven’t ordered books from Amazon since I have moved to this new address.
But Amazon has a validation before [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chillicode.wordpress.com&blog=7035872&post=134&subd=chillicode&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Today I saw an interesting way to disable the button shown in the web UI. Today I was browsing Amazon and trying to pre-order a book named “<a href="http://www.amazon.com/Confessions-Public-Speaker-Scott-Berkun/dp/0596801998" target="_blank">Confessions of the public speaker</a>” written by <a href="http://www.scottberkun.com/blog/" target="_blank">Scott Berkun</a>. I haven’t ordered books from Amazon since I have moved to this new address.</p>
<p>But Amazon has a validation before completing your shopping cart check out. That is: If you are shipping to a new address for the first time, you must key in your payment information again. This is for verification of authentication.</p>
<p>But I saw a “continue” button in the upper right corner of the screen.</p>
<p><a href="http://chillicode.files.wordpress.com/2009/10/image3.png"><img style="border-right:0;border-top:0;display:inline;border-left:0;border-bottom:0;" title="image" src="http://chillicode.files.wordpress.com/2009/10/image_thumb3.png?w=234&#038;h=123" border="0" alt="image" width="234" height="123" /></a></p>
<p>I tried to click the “Continue “ button, but once I move my mouse over this button the button got faded out and ah ha, there popped a clear message explaining why I cannot click this button, at this point of time.</p>
<p><a href="http://chillicode.files.wordpress.com/2009/10/image4.png"><img style="border-right:0;border-top:0;display:inline;border-left:0;border-bottom:0;" title="image" src="http://chillicode.files.wordpress.com/2009/10/image_thumb4.png?w=244&#038;h=103" border="0" alt="image" width="244" height="103" /></a></p>
<p>Rather than hiding the controls and startling the users by making them visible suddenly, this approach is cool. This is better than the approach of  enable/disable controls too, for this shows a friendly message to the users; rather than showing dumb disabled control.</p>
<p>Nice transparent way to control the UI flow. I am thinking of writing an user control for this. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/chillicode.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/chillicode.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/chillicode.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/chillicode.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/chillicode.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/chillicode.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/chillicode.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/chillicode.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/chillicode.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/chillicode.wordpress.com/134/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chillicode.wordpress.com&blog=7035872&post=134&subd=chillicode&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://chillicode.wordpress.com/2009/10/13/amazons-way-of-disabling-controls/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/ff410cc7807f2dfa34cd272445da8d2e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Muthu MSV</media:title>
		</media:content>

		<media:content url="http://chillicode.files.wordpress.com/2009/10/image_thumb3.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://chillicode.files.wordpress.com/2009/10/image_thumb4.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
	</channel>
</rss>