<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Aneef.Net &#187; .Net Related</title>
	<atom:link href="http://www.aneef.net/category/dotnet-framework/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.aneef.net</link>
	<description>Do it in .Net way &#124; Blogging about C#,ASP.Net, LINQ,WPF and .Net Technologies</description>
	<lastBuildDate>Mon, 24 May 2010 10:50:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Fix: .Net 2.0 or 3.5 Setup Project Requires .Net Framework version 4.0</title>
		<link>http://www.aneef.net/2010/05/24/fix-net-2-0-or-3-5-setup-project-requires-net-framework-version-4-0/</link>
		<comments>http://www.aneef.net/2010/05/24/fix-net-2-0-or-3-5-setup-project-requires-net-framework-version-4-0/#comments</comments>
		<pubDate>Mon, 24 May 2010 10:47:57 +0000</pubDate>
		<dc:creator>Aneef Fashir</dc:creator>
				<category><![CDATA[.Net Related]]></category>
		<category><![CDATA[Deployment]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Tricks & Tips]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[.NetFramework4.0]]></category>
		<category><![CDATA[VS2010]]></category>

		<guid isPermaLink="false">http://www.aneef.net/?p=134</guid>
		<description><![CDATA[Sorry again folks again I was MIA with loads and loads of work. trust me i have more than 30 drafts which i started and never got time to finish. anyway coming to the point this morning i was trying to deploy a windows service project using the setup project templates in visual studio 2010, [...]]]></description>
			<content:encoded><![CDATA[<p>Sorry again folks again I was MIA with loads and loads of work. trust me i have more than 30 drafts which i started and never got time to finish. anyway coming to the point this morning i was trying to deploy a windows service project using the setup project templates in visual studio 2010, and when i tried to install it on client machine i got the following message:</p>
<p><a href="http://www.aneef.net/wp-content/uploads/2010/05/5-24-2010-4-00-44-PM.png"><img class="alignnone size-full wp-image-135" title="5-24-2010 4-00-44 PM" src="http://www.aneef.net/wp-content/uploads/2010/05/5-24-2010-4-00-44-PM.png" alt="The Setup Requires the .Net Framework version 4.0" width="446" height="166" /></a></p>
<p>But I&#8217;m pretty sure that i had the project targeted to .net Framework 3.5 SP1, but still it was  requiring .net 4.0.  as usual i did a Google search and found <a href="http://blogs.iis.net/ma_khan/archive/2009/12/02/troubleshooting-net-2-0-setup-requires-net-4-0-runtime.aspx" target="_blank">this article </a>with the trick to resolve it.</p>
<p>actually it was the dependencies in the setup project causing the issue, it was still targetting 4.0 even though my application targets .net 3.5 and by default VS2010 set the dependency to .Net 4.0.</p>
<p>if you have this issue all you have to do is the following :</p>
<ol>
<li>Double click on the dependencies of the setup project.</li>
<li>Click on the .Net Framework</li>
<li>And you will see the Property window will get enabled.</li>
<li>Change the Version property to your desired .net Framework ( in my case 3.5).</li>
<li>and build your setup again.</li>
</ol>
<p>That&#8217;s it <img src='http://www.aneef.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>for the original article that gave me this solution <a href="http://blogs.iis.net/ma_khan/archive/2009/12/02/troubleshooting-net-2-0-setup-requires-net-4-0-runtime.aspx" target="_blank">visit here</a>.</p>
<p>Just thought i would share this information which that might be helpful for those developers who are in migration process to VS2010 <img src='http://www.aneef.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . hope it help guys!!.</p>
<p>Thanks,</p>
<p>Aneef</p>
<img src="http://www.aneef.net/?ak_action=api_record_view&id=134&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.aneef.net/2010/05/24/fix-net-2-0-or-3-5-setup-project-requires-net-framework-version-4-0/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Visual Studio 2010 RTM &amp; .Net framework 4.0 Final version released</title>
		<link>http://www.aneef.net/2010/04/12/visual-studio-2010-rtm-net-framework-4-0-final-version-released/</link>
		<comments>http://www.aneef.net/2010/04/12/visual-studio-2010-rtm-net-framework-4-0-final-version-released/#comments</comments>
		<pubDate>Mon, 12 Apr 2010 08:09:26 +0000</pubDate>
		<dc:creator>Aneef Fashir</dc:creator>
				<category><![CDATA[.Net Related]]></category>
		<category><![CDATA[MSDN]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[bizspark]]></category>
		<category><![CDATA[visualstudio]]></category>
		<category><![CDATA[Websitespark]]></category>

		<guid isPermaLink="false">http://www.aneef.net/?p=132</guid>
		<description><![CDATA[Its been a long time i wrote something on my blog, thanks to my busy work schedule i have a large number of drafts saved lolz. this is just a quick post Anyway today is another big day for .Net developers around the world, yeah the final version of visual studio 2010 is released.  visual [...]]]></description>
			<content:encoded><![CDATA[<p>Its been a long time i wrote something on my blog, thanks to my busy work schedule i have a large number of drafts saved lolz. this is just a quick post</p>
<p>Anyway today is another big day for .Net developers around the world, yeah the final version of visual studio 2010 is released.  visual studio 2010 is the next major  version of its predecessor with loads of new <a href="http://msdn.microsoft.com/en-us/library/bb386063%28VS.100%29.aspx" target="_blank">features</a>.</p>
<p>if you want to see the launch event of visual studio you can see it <a href="http://www.microsoft.com/visualstudio/en-us/watch-it-live" target="_blank">here</a>.</p>
<p><a href="http://weblogs.asp.net/scottgu">Scott Guthrie</a>, and other geeks from microsoft tweeted that visual studio will be available for download around 10 am (PST).  and the good news is its available for the <a href="http://www.microsoft.com/web/websitespark/" target="_blank">websitespark </a>subscribers too <img src='http://www.aneef.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>here are some of those tweets for you :</p>
<blockquote><p>@<a rel="nofollow" href="http://twitter.com/shanselman">shanselman</a>:  Developers: MSDN will be updated with <a title="#vs2010" rel="nofollow" href="http://twitter.com/search?q=%23vs2010">#vs2010</a> downloads and  details at 10am PST *today*! Pls RT! <a rel="bookmark" href="http://twitter.com/Aneef/status/12035037152"></a></p></blockquote>
<blockquote><p><a href="http://twitter.com/scottgu" target="_blank">@scottgu</a>:MSDN Subscribers &amp; WebsiteSpark/BizSpark  members can download VS 2010 Monday morning.</p></blockquote>
<p>happy developing guys <img src='http://www.aneef.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<img src="http://www.aneef.net/?ak_action=api_record_view&id=132&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.aneef.net/2010/04/12/visual-studio-2010-rtm-net-framework-4-0-final-version-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FCKEDitor &#8211; FIXED Image Upload dialog hang for .net</title>
		<link>http://www.aneef.net/2009/09/25/fckeditor-fixed-image-upload-dialog-hang-for-net/</link>
		<comments>http://www.aneef.net/2009/09/25/fckeditor-fixed-image-upload-dialog-hang-for-net/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 11:22:53 +0000</pubDate>
		<dc:creator>Aneef Fashir</dc:creator>
				<category><![CDATA[.Net Related]]></category>
		<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[CKEditor]]></category>
		<category><![CDATA[Continous]]></category>
		<category><![CDATA[FCK Editor]]></category>
		<category><![CDATA[Image]]></category>
		<category><![CDATA[Progress]]></category>
		<category><![CDATA[Upload]]></category>

		<guid isPermaLink="false">http://www.aneef.net/?p=107</guid>
		<description><![CDATA[Well This issue has been bugging alot of people around the net it seems. I&#8217;m one of the victim too *sigh*.. anways bianchi007, a member in the CKSource Site forums had posted a solution. thought it would be worth to share. Here is the solution which was posted in this thread. This is for the [...]]]></description>
			<content:encoded><![CDATA[<p>Well This issue has been bugging alot of people around the net it seems. I&#8217;m one of the victim too *sigh*.. anways <a href="http://cksource.com/forums/memberlist.php?mode=viewprofile&amp;u=12108">bianchi007,</a> a member in the <a href="http://cksource.com/Forums/">CKSource </a>Site forums had posted a solution. thought it would be worth to share.</p>
<p>Here is the solution which was posted in <a href="http://cksource.com/forums/viewtopic.php?f=6&amp;t=12112&amp;p=36585&amp;hilit=image+upload#p36585">this thread</a>.</p>
<p>This is for the .net assembly 2_6_3. I based it on the help file <a href="http://dev.fckeditor.net/attachment/ticket/2115/2115.patch">http://dev.fckeditor.net/attachment/tic &#8230; 2115.patch</a></p>
<p>Steps:</p>
<p>Open the FredCK.FCKeditorV2.vs2005.csproj in Visual Studio 2005</p>
<p>Open the file FileBrowser &gt; FileWorkerBase.cs</p>
<p>Go to line 119</p>
<p>Replace:</p>
<pre class="brush: csharp;">
Response.Write( @&quot;(function(){var d=document.domain;while (true){try{var A=window.top.opener.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:\.|$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})();&quot; );
</pre>
<p>Replace with: </p>
<pre class="brush: csharp;">
Response.Write(@&quot;(function(){var d=document.domain;while (true){try{var A=window.parent.OnUploadCompleted;break;}catch(e) {};d=d.replace(/.*?(?:\.|$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})();&quot;);
</pre>
<p>Compile the project and then reference the new dll file in your project.</p>
<p>I hope it helps <img src='http://www.aneef.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<img src="http://www.aneef.net/?ak_action=api_record_view&id=107&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.aneef.net/2009/09/25/fckeditor-fixed-image-upload-dialog-hang-for-net/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Scott Guthrie Announces the WebsiteSpark Program</title>
		<link>http://www.aneef.net/2009/09/24/scott-guthrie-announces-the-websitespark-program/</link>
		<comments>http://www.aneef.net/2009/09/24/scott-guthrie-announces-the-websitespark-program/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 10:06:43 +0000</pubDate>
		<dc:creator>Aneef Fashir</dc:creator>
				<category><![CDATA[.Net Related]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[visual studio 2008]]></category>
		<category><![CDATA[Expression Blend]]></category>
		<category><![CDATA[ScottGu]]></category>
		<category><![CDATA[SQL Server 2008]]></category>
		<category><![CDATA[WebSpark]]></category>

		<guid isPermaLink="false">http://www.aneef.net/?p=104</guid>
		<description><![CDATA[Scott guthrie just did a great announcement about the WebsiteSpark Program. what is WebsiteSpark? WebsiteSpark is designed for independent web developers and web development companies that build web applications and web sites on behalf of others.  It enables you to get software, support and business resources from Microsoft at no cost for three years, and [...]]]></description>
			<content:encoded><![CDATA[<p>Scott guthrie just did a great announcement about the <a href="http://www.microsoft.com/web/websitespark/">WebsiteSpark </a>Program.</p>
<p><strong>what is WebsiteSpark?</strong></p>
<p><span style="font-family: arial; font-size: x-small;"><a href="http://www.microsoft.com/web/websitespark/" target="_blank">WebsiteSpark</a> is designed for independent web developers and web development companies that build web applications and web sites on behalf of others.  It enables you to get software, support and business resources from Microsoft at no cost for three years, and enables you to expand your business and build great web solutions using ASP.NET, Silverlight, SharePoint and PHP, and the <a href="http://www.microsoft.com/web/gallery/default.aspx" target="_blank">open source applications</a> built on top of them.</p>
<h3><span style="text-decoration: underline;">What does the program provide?</span></h3>
<p><a href="http://www.microsoft.com/web/websitespark/" target="_blank">WebSiteSpark</a> provides software licenses that you can use for three years at no cost.  Once enrolled, you can download and immediately use the following software from Microsoft:</p>
<ul>
<li>3 licenses of Visual Studio 2008 Professional Edition</li>
<li>1 license of Expression Studio 3 (which includes Expression Blend, Sketchflow, and Web)</li>
<li>2 licenses of Expression Web 3</li>
<li>4 processor licenses of Windows Web Server 2008 R2</li>
<li>4 processor licenses of SQL Server 2008 Web Edition</li>
<li>DotNetPanel control panel (enabling easy remote/hosted management of your servers)</li>
</ul>
<p>The Windows Server and SQL Server licenses can be used for both development <em>and</em> production deployment.  You can either self-host the servers on your own, or use the licenses with a hoster.  <a href="http://www.microsoft.com/web/websitespark/" target="_blank">WebsiteSpark</a> makes it easy to find hosters who are also enrolled in the program, and who can use your licenses to provide you with either dedicated or virtual dedicated servers to host your sites on.</p>
<p>In addition to software, <a href="http://www.microsoft.com/web/websitespark/" target="_blank">WebsiteSpark</a> provides partner opportunities to grow and build your business (including customer referrals through our partner programs).  It also includes product support (including 2 professional support incidents) and free online training for the products.</p>
<p>for further information on this visit Scotts blog <a href="http://weblogs.asp.net/scottgu/archive/2009/09/24/announcing-the-websitespark-program.aspx">here.</a></p>
<p>Thanks Scott for the great information <img src='http://www.aneef.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p></span></p>
<img src="http://www.aneef.net/?ak_action=api_record_view&id=104&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.aneef.net/2009/09/24/scott-guthrie-announces-the-websitespark-program/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ClickOnce Application,Expired Certificates &amp; Public Key Token PART III &#8211; Pushing .net Framework 3.5</title>
		<link>http://www.aneef.net/2009/07/09/clickonce-applicationexpired-certificates-public-key-token-part-iii-pushing-net-framework-3-5/</link>
		<comments>http://www.aneef.net/2009/07/09/clickonce-applicationexpired-certificates-public-key-token-part-iii-pushing-net-framework-3-5/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 11:33:24 +0000</pubDate>
		<dc:creator>Aneef Fashir</dc:creator>
				<category><![CDATA[.Net Related]]></category>
		<category><![CDATA[ClickOnce]]></category>
		<category><![CDATA[Tricks & Tips]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[visual studio 2008]]></category>
		<category><![CDATA[.Net Installation.]]></category>
		<category><![CDATA[Certificate]]></category>
		<category><![CDATA[Check .Net Framework]]></category>
		<category><![CDATA[Registry]]></category>

		<guid isPermaLink="false">http://www.aneef.net/2009/07/09/clickonce-applicationexpired-certificates-public-key-token-part-iii-pushing-net-framework-3-5/</guid>
		<description><![CDATA[In the last few weeks I wrote 2 articles on how to resolve ClickOnce certificate expiration issues. you can find those articles here : ClickOnce Application,Expired Certificates &#38; Public Key Token PART I ClickOnce Application,Expired Certificates &#38; Public Key Token PART II During my work on this ClickOnce update, we decided to upgrade the application [...]]]></description>
			<content:encoded><![CDATA[<p>In the last few weeks I wrote 2 articles on how to resolve ClickOnce certificate expiration issues. you can find those articles here :</p>
<ol>
<li><a href="http://www.aneef.net/2009/06/11/clickonce-applicationexpired-certificates-public-key-token-part-i/">ClickOnce Application,Expired Certificates &amp; Public Key Token PART I</a>
<li><a href="http://www.aneef.net/2009/06/11/clickonce-applicationexpired-certificates-public-key-token-part-ii/">ClickOnce Application,Expired Certificates &amp; Public Key Token PART II</a> </li>
</ol>
<ol>During my work on this ClickOnce update, we decided to upgrade the application to target .net framework 3.5 sp1.</ol>
<ol>so I just set the target framework to 3.5 and set the required prerequisites (.net 3.5 SP1, and Windows Installer 3.1). and built the project and published it. and when I tried on a client machine which had .net framework 2.0, application got updated, prompted the uninstall message, and tried to launch the new ClickOnce application from the new URL, and BANG!. we get an error :</ol>
<ol><a href="http://www.aneef.net/wp-content/uploads/2009/07/image001.jpg"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="image001" src="http://www.aneef.net/wp-content/uploads/2009/07/image001_thumb.jpg" width="286" height="142"></a></ol>
<ol>The Error Message Says :</ol>
<blockquote><p>Unable to install or run the application. The application</p>
<p>requires that assembly WindowsBase Version 3.0.0.0 be</p>
<p>installed in the Global Assembly Cache (GAC) first.</p>
</blockquote>
<p>Why is this ?, its because when we try to launch the new application URL we do this :</p>
<pre>DeploymentUtils.AutoInstall("&lt;Path toNewApplication.application&gt;");</pre>
<pre>&nbsp;</pre>
<p>we request for the application manifest. and it fails to launch the application because it doesn&#8217;t have the prerequisites. and now to force the new prerequisites the application should call the setup.exe in the Web Server instead of the manifest. now the question is, what if the user already have&nbsp; the .net Framework 3.5 SP1?, we don&#8217;t have to prompt the client to install them again by launching setup.exe, we just have to launch the manifest. To Serve both the above scenario we need to check if the client machine has .net framework 3.5 SP1, and depending on its availability we need to launch the manifest or the setup.exe. The existence of .net Framework can be obtained from the following registry location: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP <a href="http://www.aneef.net/wp-content/uploads/2009/07/image.png"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="image" src="http://www.aneef.net/wp-content/uploads/2009/07/image_thumb.png" width="544" height="216"></a> you can find out all the .net Frameworks installed and their service pack versions in this registry entry. Following are the locations of the main Net Frameworks:</p>
<table border="0" cellspacing="0" cellpadding="2" width="540">
<tbody>
<tr>
<td valign="top" width="128">Framework 1.1</td>
<td valign="top" width="411">Software\\Microsoft\\NET Framework Setup\\NDP\\v1.1.4322</td>
</tr>
<tr>
<td valign="top" width="128">Framework 2.0</td>
<td valign="top" width="411">Software\\Microsoft\\NET Framework Setup\\NDP\\v2.0.50727</td>
</tr>
<tr>
<td valign="top" width="128">Framework 3.0</td>
<td valign="top" width="411">Software\\Microsoft\\NET Framework Setup\\NDP\\v3.0\\Setup</td>
</tr>
<tr>
<td valign="top" width="128">Framework 3.5</td>
<td valign="top" width="411">Software\\Microsoft\\NET Framework Setup\\NDP\\v3.5</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>Now we can check if the required .net Framework is available in the client machine, and launch the application setup.exe or the manifest. to do this we need to programmatically check these registries. for this I used the attached code ( I Couldn&#8217;t find the original author, Credits goes to him/her) which I found from web and modified to avoid few bugs. you can add this code to your project and do the below check in your application to decide which file to be launched :</p>
<pre class="csharpcode">&nbsp;</pre>
<pre class="csharpcode"><span class="kwrd">string</span> FileToLaunch=<span class="str">@"/setup.exe"</span>;
<span class="kwrd">if</span> (FrameworkUtils.IsInstalled(FrameworkVersion.Fx35)

 &amp;&amp; FrameworkUtils.GetServicePackLevel(FrameworkVersion.Fx35) == 1)
          {
            FileToLaunch = <span class="str">@"/&lt;application manifest.application&gt;"</span>;
          }
            MessageBox.Show(<span class="str">"Your message here"</span>);
            <span class="kwrd">string</span> updateURL = DeploymentUtils.getUpdateURL();
            DeploymentUtils.UninstallMe();
            DeploymentUtils.AutoInstall(<span class="str">"https://"</span> + updateURL + FileToLaunch);
            Application.Exit();</pre>
<style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
<pre class="csharpcode">&nbsp;</pre>
<p>And that&#8217;s all, now the application will launch the setup.exe if the client doesn&#8217;t have the .net Framework 3.5 and prompt for its installation, or launch the application manifest if client has the framework installed.</p>
<p>Now you can solve your ClickOnce issue as well as upgrade .net Framework in client machine at the same time without problem.</p>
<p><a href="wp-content/uploads/2009/07/FrameworkUtil.cs.txt">Download FrameworkUtils.cs</a></p>
<p><!-- .csharpcode, .csharpcode pre { 	font-size: small; 	color: black; 	font-family: consolas, "Courier New", courier, monospace; 	background-color: #ffffff; 	/*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  { 	background-color: #f4f4f4; 	width: 100%; 	margin: 0em; } .csharpcode .lnum { color: #606060; } --></p>
<img src="http://www.aneef.net/?ak_action=api_record_view&id=97&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.aneef.net/2009/07/09/clickonce-applicationexpired-certificates-public-key-token-part-iii-pushing-net-framework-3-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Request UAC Elevation for .net Application (Managed Code)</title>
		<link>http://www.aneef.net/2009/06/29/request-uac-elevation-for-net-application-managed-code/</link>
		<comments>http://www.aneef.net/2009/06/29/request-uac-elevation-for-net-application-managed-code/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 15:35:48 +0000</pubDate>
		<dc:creator>Aneef Fashir</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[visual studio 2008]]></category>
		<category><![CDATA[Administrator]]></category>
		<category><![CDATA[Application Manifest]]></category>
		<category><![CDATA[mt.exe]]></category>
		<category><![CDATA[Permission]]></category>
		<category><![CDATA[UAC]]></category>
		<category><![CDATA[User Account Control]]></category>
		<category><![CDATA[Vista]]></category>
		<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[WindowsPrincipal]]></category>

		<guid isPermaLink="false">http://www.aneef.net/2009/06/29/request-uac-elevation-for-net-application-managed-code/</guid>
		<description><![CDATA[Its about time for us to get ready for Windows 7. and most of us have to develop applications compatible to Windows 7, Vista, and Server 2008. and sometimes we need applications to run with administrative privileges. and that&#8217;s not a big deal. but in these new Operating Systems, even an administrator is sometimes locked [...]]]></description>
			<content:encoded><![CDATA[<p>Its about time for us to get ready for <a href="http://www.microsoft.com/windows/windows-7/" target="_blank">Windows 7</a>. and most of us have to develop applications compatible to Windows 7, Vista, and Server 2008. and sometimes we need applications to run with administrative privileges. and that&#8217;s not a big deal. but in these new Operating Systems, even an administrator is sometimes locked by the <a href="http://en.wikipedia.org/wiki/User_Account_Control" target="_blank">UAC</a> when running some applications.</p>
<p>some applications might throw exceptions in such situation, when we need administrative privileges to do some task, if they don’t request for UAC elevation by the application. only option to make these application is to right click and select “Run as Administrator” to manually trigger UAC.</p>
<p>In this post I’m going to show how to request for UAC Elevation for a .net Application. this explains the use of <a href="http://msdn.microsoft.com/en-us/library/aa374191(VS.85).aspx" target="_blank">Application Manifests</a> that request the OS for UAC elevation. </p>
<p>&#160;</p>
<h2>Code</h2>
<p>I have my sample windows form C# Project with a single form that shows a message box on form load,showing whether you are an administrator or not.</p>
<p>&#160;</p>
<pre class="csharpcode">  <span class="kwrd">private</span> <span class="kwrd">void</span> Form1_Load(<span class="kwrd">object</span> sender, EventArgs e)
        {
         <span class="kwrd">bool</span> isAdmin = <span class="kwrd">new</span> WindowsPrincipal(WindowsIdentity.GetCurrent())</pre>
<pre class="csharpcode">                   .IsInRole(WindowsBuiltInRole.Administrator) ? <span class="kwrd">true</span> : <span class="kwrd">false</span>;

            <span class="kwrd">if</span>(isAdmin)
            {
                MessageBox.Show(<span class="str">&quot;you are an administrator&quot;</span>);
            }
            <span class="kwrd">else</span>
            {
                MessageBox.Show(<span class="str">&quot;You are not an administrator&quot;</span>);
            }
        }</pre>
<style type="text/css">
<p>.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<p>&#160;</p>
<p>in the above code we use <a href="http://msdn.microsoft.com/en-us/library/system.security.principal.windowsprincipal.aspx" target="_blank">WindowsPrincipal</a> class, which allows us to check the Windows group membership of a Windows user. to use this classes un need to use the following namespace in the code:</p>
<pre class="csharpcode"><span class="kwrd">using</span> System.Security.Principal;</pre>
<pre class="csharpcode">&#160;</pre>
<p>when you compile this application and run , you would expect that it will show the message saying “you are an administrator” if you are logged in as an administrator account. well this is what you get if you have UAC enabled, not something you expected right ?</p>
<p><a href="http://www.aneef.net/wp-content/uploads/2009/06/image.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.aneef.net/wp-content/uploads/2009/06/image_thumb.png" width="221" height="156" /></a> </p>
<style type="text/css">
<p>.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<p>ok now we need to make our application to request for UAC elevation.&#160; first we need to create a manifest file with the application name.</p>
<h2>Create Manifest File</h2>
<p>First add a new item to the project with the name with following format, &lt;applicationname&gt;.exe.manifest . in our case (ElevationTest.exe.manifest). and add the following XML:</p>
<pre class="csharpcode"><span class="kwrd">&lt;?</span><span class="html">xml</span> <span class="attr">version</span><span class="kwrd">=&quot;1.0&quot;</span> <span class="attr">encoding</span><span class="kwrd">=&quot;UTF-8&quot;</span> <span class="attr">standalone</span><span class="kwrd">=&quot;yes&quot;</span>?<span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">assembly</span> <span class="attr">xmlns</span><span class="kwrd">=&quot;urn:schemas-microsoft-com:asm.v1&quot;</span> <span class="attr">manifestVersion</span><span class="kwrd">=&quot;1.0&quot;</span><span class="kwrd">&gt;</span>
   <span class="kwrd">&lt;</span><span class="html">assemblyIdentity</span> <span class="attr">version</span><span class="kwrd">=&quot;1.0.0.0&quot;</span>  <span class="attr">name</span><span class="kwrd">=&quot;ElevationTest&quot;</span> <span class="attr">type</span><span class="kwrd">=&quot;win32&quot;</span><span class="kwrd">/&gt;</span>
      <span class="kwrd">&lt;</span><span class="html">trustInfo</span> <span class="attr">xmlns</span><span class="kwrd">=&quot;urn:schemas-microsoft-com:asm.v3&quot;</span><span class="kwrd">&gt;</span>
      <span class="kwrd">&lt;</span><span class="html">security</span><span class="kwrd">&gt;</span>
         <span class="kwrd">&lt;</span><span class="html">requestedPrivileges</span><span class="kwrd">&gt;</span>
            <span class="kwrd">&lt;</span><span class="html">requestedExecutionLevel</span> <span class="attr">level</span><span class="kwrd">=&quot;requireAdministrator&quot;</span><span class="kwrd">/&gt;</span>
         <span class="kwrd">&lt;/</span><span class="html">requestedPrivileges</span><span class="kwrd">&gt;</span>
      <span class="kwrd">&lt;/</span><span class="html">security</span><span class="kwrd">&gt;</span>
   <span class="kwrd">&lt;/</span><span class="html">trustInfo</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">assembly</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<p>and the next step is to add the manifest in to the built executables Win32Resources by embedding it.&#160; to do this we need to use the MT.exe in the .Net SDK.&#160; by default it can be found in “C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\”.</p>
<p>we can use the following command to embed the manifest through visual studio command line:</p>
<p><strong>mt.exe –manifest MyApp.exe.manifest -outputresource:MyApp.exe;1</strong> </p>
<p>or </p>
<p><strong>mt.exe –manifest MyLibrary.dll.manifest -outputresource:MyLibrary.dll;2</strong> </p>
<p>(1 for an EXE, 2 for a DLL.) </p>
<p>to make things easier we can add this command to the postbuild event of the project :</p>
<p><a href="http://www.aneef.net/wp-content/uploads/2009/06/image1.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.aneef.net/wp-content/uploads/2009/06/image_thumb1.png" width="549" height="328" /></a><br />
<style type="text/css">
<p>.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
</p>
<p>below is the full&#160; post build command:</p>
<p>&quot;C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\mt.exe&quot; -manifest &quot;$(ProjectDir)$(TargetName).exe.manifest&quot;&#160; –outputresource:&quot;$(TargetDir)$(TargetFileName)&quot;;#1</p>
<p>once you have built the application successfully if you see the output directory you will see the icons will have a shield on them indicating that the application requires UAC elevation.</p>
<p><a href="http://www.aneef.net/wp-content/uploads/2009/06/image2.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.aneef.net/wp-content/uploads/2009/06/image_thumb2.png" width="322" height="159" /></a> </p>
<p>And now if you run your built application it will prompt for UAC : and when you click on allow the application will show you the following Message : </p>
<p>&#160;</p>
<p><a href="http://www.aneef.net/wp-content/uploads/2009/06/image3.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.aneef.net/wp-content/uploads/2009/06/image_thumb3.png" width="199" height="156" /></a> </p>
<p>That’s it you have your application ready to request UAC Elevation in the new operating systems.</p>
<p>&#160;</p>
<p>hope it helps.</p>
<p><a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fwww.aneef.net%2f2009%2f06%2f29%2frequest-uac-elevation-for-net-application-managed-code%2f"><img border="0" alt="kick it on DotNetKicks.com" src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.aneef.net%2f2009%2f06%2f29%2frequest-uac-elevation-for-net-application-managed-code%2f" /></a></p>
<p><!-- BEGIN SMOWTION TAG - 468x60 - aneef net: tecnologia - DO NOT MODIFY --><br />
<script type="text/javascript"><!--
smowtion_size = "468x60";
smowtion_section = "642940";
//-->
</script><br />
<script type="text/javascript" src="http://ads.smowtion.com/ad.js">
</script><br />
<!-- END SMOWTION TAG - 468x60 - aneef net: tecnologia - DO NOT MODIFY --></p>
<img src="http://www.aneef.net/?ak_action=api_record_view&id=87&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.aneef.net/2009/06/29/request-uac-elevation-for-net-application-managed-code/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>PDB Files: What Every Developer Must Know</title>
		<link>http://www.aneef.net/2009/05/13/pdb-files-what-every-developer-must-know/</link>
		<comments>http://www.aneef.net/2009/05/13/pdb-files-what-every-developer-must-know/#comments</comments>
		<pubDate>Wed, 13 May 2009 05:20:46 +0000</pubDate>
		<dc:creator>Aneef Fashir</dc:creator>
				<category><![CDATA[.Net Related]]></category>
		<category><![CDATA[Debugging]]></category>

		<guid isPermaLink="false">http://www.aneef.net/2009/05/13/pdb-files-what-every-developer-must-know/</guid>
		<description><![CDATA[This is just a link post for the post below: PDB Files: What Every Developer Must Know This Morning Merill  twitted a link on his twitter, for this valuable post about PDB Files by John Robbins. honestly I didn&#8217;t know much about the importance of PDB files until I read this.  I  think each .Net [...]]]></description>
			<content:encoded><![CDATA[<p><strong>This is just a link post for the post below:</strong></p>
<p><a href="http://www.wintellect.com/CS/blogs/jrobbins/archive/2009/05/11/pdb-files-what-every-developer-must-know.aspx" target="_blank">PDB Files: What Every Developer Must Know</a></p>
<p>This Morning <a href="http://www.merill.net" target="_blank">Merill</a>  twitted a link on his <a href="http://twitter.com/merill" target="_blank">twitter</a>, for this valuable post about PDB Files by <a href="http://www.wintellect.com/CS/blogs/jrobbins/default.aspx">John Robbins</a>. honestly I didn&#8217;t know much about the importance of PDB files until I read this. </p>
<p>I  think each .Net Developer must read the post <a href="http://www.wintellect.com/CS/blogs/jrobbins/archive/2009/05/11/pdb-files-what-every-developer-must-know.aspx" target="_blank">here</a>.</p>
<p>Thanks Jhon For the information, and merill for sharing this <img src='http://www.aneef.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<img src="http://www.aneef.net/?ak_action=api_record_view&id=66&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.aneef.net/2009/05/13/pdb-files-what-every-developer-must-know/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ASP.Net 3.5  ListView Control and Book Flip effect</title>
		<link>http://www.aneef.net/2009/04/16/aspnet-35-listview-control-and-book-flip-effect/</link>
		<comments>http://www.aneef.net/2009/04/16/aspnet-35-listview-control-and-book-flip-effect/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 08:28:54 +0000</pubDate>
		<dc:creator>Aneef Fashir</dc:creator>
				<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[Tricks & Tips]]></category>

		<guid isPermaLink="false">http://www.aneef.net/2009/04/16/aspnet-35-listview-control-and-book-flip-effect/</guid>
		<description><![CDATA[one of the coolest control in ASP.Net 3.5 is its Listview Control. its too CSS friendly, and we can use it to achieve many great content presentations. if you go to scottgu&#8217;s blog you can find some good articles on how to use the listview control. recently I did such an implementation. its using the [...]]]></description>
			<content:encoded><![CDATA[<p>one of the coolest control in ASP.Net 3.5 is its <a href="http://msdn.microsoft.com/en-us/library/bb398790.aspx" target="_blank">Listview</a> Control. its too CSS friendly, and we can use it to achieve many great content presentations. if you go to scottgu&#8217;s blog you can find some good articles on <a href="http://weblogs.asp.net/scottgu/archive/2007/08/10/the-asp-listview-control-part-1-building-a-product-listing-page-with-clean-css-ui.aspx" target="_blank">how to use the listview control</a>. </p>
<p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:84c1fa9b-1ab9-4cb7-bd88-7865eb5324e1" class="wlWriterSmartContent">
<div id="120aa13c-244b-4179-b933-42a7c1ab72ae" style="margin: 0px; padding: 0px; display: inline;">
<div><a href="http://www.youtube.com/watch?v=nNnk9chiriU" target="_new"><img src="http://www.aneef.net/wp-content/uploads/2009/04/video83c3c0ada8e7.jpg" galleryimg="no" onload="var downlevelDiv = document.getElementById('120aa13c-244b-4179-b933-42a7c1ab72ae'); downlevelDiv.innerHTML = &quot;&lt;div&gt;&lt;object width=\&quot;425\&quot; height=\&quot;355\&quot;&gt;&lt;param name=\&quot;movie\&quot; value=\&quot;http://www.youtube.com/v/nNnk9chiriU\&quot;&gt;&lt;\/param&gt;&lt;param name=\&quot;wmode\&quot; value=\&quot;transparent\&quot;&gt;&lt;\/param&gt;&lt;embed src=\&quot;http://www.youtube.com/v/nNnk9chiriU\&quot; type=\&quot;application/x-shockwave-flash\&quot; wmode=\&quot;transparent\&quot; width=\&quot;425\&quot; height=\&quot;355\&quot;&gt;&lt;\/embed&gt;&lt;\/object&gt;&lt;\/div&gt;&quot;;" alt=""></a></div>
</div>
</div>
<p>recently I did such an implementation. its using the <a href="http://www.coastworx.com/bookflip.php" target="_blank">javascript bookflip.</a> a great work by <a href="http://coastworx.com/contact.php" target="_blank">Will</a> (very kind of him to share this to the world). I used the his code, and ListView to achieve a dynamic bookflip.&nbsp; apart from the javascript changes,&nbsp; here is the change I did for the Listview markup.</p>
<pre class="csharpcode">&nbsp;</pre>
<pre class="csharpcode">&nbsp;</pre>
<pre class="csharpcode"> <span class="kwrd">&lt;</span><span class="html">asp:ListView</span> <span class="attr">id</span><span class="kwrd">="ImageFlip"</span> <span class="attr">runat</span><span class="kwrd">="server"</span> <span class="attr">ItemPlaceholderID</span><span class="kwrd">="ItemContainer"</span><span class="kwrd">&gt;</span>
   <span class="kwrd">&lt;</span><span class="html">LayoutTemplate</span><span class="kwrd">&gt;</span>
      <span class="kwrd">&lt;</span><span class="html">div</span> <span class="attr">id</span><span class="kwrd">="myBook"</span> <span class="attr">style</span><span class="kwrd">="width: &lt;%# flipWidth*2 %&gt;px; height:</span></pre>
<pre class="csharpcode"><span class="kwrd"> &lt;%# flipHeight %&gt;px; position: relative; z-index: 5;"</span><span class="kwrd">&gt;</span>
        <span class="kwrd">&lt;</span><span class="html">asp:PlaceHolder</span> <span class="attr">ID</span><span class="kwrd">="ItemContainer"</span>  <span class="attr">runat</span><span class="kwrd">="server"</span> <span class="kwrd">/&gt;</span>
        <span class="kwrd">&lt;</span><span class="html">div</span> <span class="attr">style</span><span class="kwrd">="border: 0px solid #ddd;
    text-align: center;
    padding-top: 100px;
    margin: 0px;
    height: 0px;
    text-align:inherit;
    background-color: #ffffff;
 color: #cf0000;vertical-align:bottom"</span> <span class="attr">Name</span><span class="kwrd">="Back"</span> <span class="kwrd">&gt;</span> </pre>
<pre class="csharpcode"><span class="kwrd">&lt;</span><span class="html">img</span> <span class="attr">src</span><span class="kwrd">="spongebob300/bk.jpg"</span>  <span class="attr">border</span><span class="kwrd">="0"</span> <span class="attr">usemap</span><span class="kwrd">="#Map"</span> <span class="kwrd">/&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">div</span><span class="kwrd">&gt;</span>

      <span class="kwrd">&lt;/</span><span class="html">div</span> <span class="kwrd">&gt;</span>
   <span class="kwrd">&lt;/</span><span class="html">LayoutTemplate</span><span class="kwrd">&gt;</span>
   <span class="kwrd">&lt;</span><span class="html">ItemTemplate</span><span class="kwrd">&gt;</span>

   <span class="kwrd">&lt;</span><span class="html">div</span> <span class="attr">style</span><span class="kwrd">="background:#ffffff ;color:#ffffff;</span></pre>
<pre class="csharpcode"><span class="kwrd"> cursor:url(ajax/zoom-in.cur),auto; z-index:-&lt;%#Eval("</span><span class="attr">PAGENO</span><span class="kwrd">") %&gt;;"</span> </pre>
<pre class="csharpcode"><span class="attr">name</span><span class="kwrd">="Page &lt;%#Eval("</span><span class="attr">PAGENO</span><span class="kwrd">") %&gt;"</span> <span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">a</span> <span class="attr">href</span><span class="kwrd">="Javascript:getFullImage(&lt;%#Eval("</span><span class="attr">ID</span><span class="kwrd">") %&gt;)"</span> <span class="kwrd">&gt;</span></pre>
<pre class="csharpcode"><span class="kwrd">&lt;</span><span class="html">img</span> <span class="attr">src</span><span class="kwrd">="&lt;%#Eval("</span><span class="attr">FlipImage</span><span class="kwrd">") %&gt;"</span> <span class="attr">alt</span><span class="kwrd">="Page &lt;%#Eval("</span><span class="attr">PAGENO</span><span class="kwrd">") %&gt;"</span> </pre>
<pre class="csharpcode">  <span class="attr">border</span><span class="kwrd">="0"</span> <span class="attr">style</span><span class="kwrd">="cursor:url(ajax/zoom-in.cur),auto;"</span> <span class="kwrd">/&gt;&lt;/</span><span class="html">a</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;/</span><span class="html">div</span><span class="kwrd">&gt;</span>
   <span class="kwrd">&lt;/</span><span class="html">ItemTemplate</span><span class="kwrd">&gt;</span>
   <span class="kwrd">&lt;/</span><span class="html">asp:ListView</span><span class="kwrd">&gt;</span>
</pre>
<pre class="csharpcode">&nbsp;</pre>
<p>And the Data Retrieval is just as simple as the following 3 lines:</p>
<div class="csharpcode">
<pre class="alt">DataTable dt = db.getFlipPage(catid);</pre>
<pre>ImageFlip.DataSource = dt;</pre>
<pre class="alt">ImageFlip.DataBind();</pre>
</div>
<style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
<p>&nbsp;</p>
<p>And that&#8217;s all. very easy isn&#8217;t it. for the real implementation of this go to <a href="http://www.catalogues4u.com.au">www.catalogues4u.com.au</a> and click on a catalogue.In that site I have also implemented a carousel using Listview.&nbsp; hope it helps.</p>
<pre class="csharpcode">&nbsp;</pre>
<style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
<p><br/><br />
<a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fwww.aneef.net%2f2009%2f04%2f16%2faspnet-35-listview-control-and-book-flip-effect%2f"><img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.aneef.net%2f2009%2f04%2f16%2faspnet-35-listview-control-and-book-flip-effect%2f" border="0" alt="kick it on DotNetKicks.com" /></a><br />
<br/><br />
<script type="text/javascript"><!--
google_ad_client = "pub-3530459083226419";
/* linksonly */
google_ad_slot = "6143752371";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br/><br />
<script type="text/javascript"><!--
google_ad_client = "pub-3530459083226419";
//468x60, created 12/20/07
google_ad_slot = "4319330936";
google_ad_width = 468;
google_ad_height = 60;
google_cpa_choice = ""; // on file
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<img src="http://www.aneef.net/?ak_action=api_record_view&id=56&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.aneef.net/2009/04/16/aspnet-35-listview-control-and-book-flip-effect/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Uploading Binary files or Images using LINQ to SQL</title>
		<link>http://www.aneef.net/2009/01/16/uploading-binary-files-or-images-using-linq-to-sql/</link>
		<comments>http://www.aneef.net/2009/01/16/uploading-binary-files-or-images-using-linq-to-sql/#comments</comments>
		<pubDate>Fri, 16 Jan 2009 09:34:34 +0000</pubDate>
		<dc:creator>Aneef Fashir</dc:creator>
				<category><![CDATA[LINQ]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[visual studio 2008]]></category>

		<guid isPermaLink="false">http://www.aneef.net/2009/01/16/uploading-binary-files-or-images-using-linq-to-sql/</guid>
		<description><![CDATA[Today I received an email from a friend, asking how to save a binary file in to the database using LINQ to SQL.  This was the second time a person had asked me the same question, So I thought of having a blog entry about it. Assume that we need to upload a file  and [...]]]></description>
			<content:encoded><![CDATA[<p>Today I received an email from a friend, asking how to save a binary file in to the database using LINQ to SQL.  This was the second time a person had asked me the same question, So I thought of having a blog entry about it.</p>
<p>Assume that we need to upload a file  and save its name, and the file in the database table. so lets see how we do it.</p>
<p><strong>This is my Table</strong></p>
<pre class="csharpcode"><span class="kwrd">CREATE</span> <span class="kwrd">TABLE</span> [dbo].[Files2](
    [ID] [<span class="kwrd">int</span>] <span class="kwrd">IDENTITY</span>(1,1) <span class="kwrd">NOT</span> <span class="kwrd">NULL</span>,
    [FileName] [<span class="kwrd">varchar</span>](50) <span class="kwrd">NOT</span> <span class="kwrd">NULL</span>,
    [FileSource] [image] <span class="kwrd">NOT</span> <span class="kwrd">NULL</span>,
 )
<span class="kwrd">GO</span></pre>
<pre class="csharpcode">And The Following Stored Procedure is used to Insert the Value:</pre>
<pre class="csharpcode"> </pre>
<pre class="csharpcode"><span class="kwrd">CREATE</span> <span class="kwrd">PROCEDURE</span> [dbo].[ADDFILE]
(
    @FILENAME <span class="kwrd">VARCHAR</span>(50),
    @FILESOURCE image
)
<span class="kwrd">AS</span>
<span class="kwrd">SET</span> NOCOUNT <span class="kwrd">ON</span>

INSERT <span class="kwrd">INTO</span> Files([FileName],[FileSource])
<span class="kwrd">VALUES</span>(@FILENAME,@FILESOURCE)</pre>
<p><!-- .csharpcode, .csharpcode pre { 	font-size: small; 	color: black; 	font-family: consolas, "Courier New", courier, monospace; 	background-color: #ffffff; 	/*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  { 	background-color: #f4f4f4; 	width: 100%; 	margin: 0em; } .csharpcode .lnum { color: #606060; } --></p>
<p>And the following code is used to upload and save the file using web form with a text box for file name, and a file upload control to upload the file. on the click event of a button this code is called.</p>
<pre class="csharpcode"><span class="kwrd">protected</span> <span class="kwrd">void</span> Button1_Click(<span class="kwrd">object</span> sender, EventArgs e)
{

     <span class="kwrd">if</span> (FileUploader.HasFile &amp;&amp; FileUploader.PostedFile.ContentLength &gt; 0)
      {
          <span class="kwrd">string</span> filename = txtFileName.Text;
          <span class="rem">//Read the file in to a byte Array.</span>
          <span class="kwrd">byte</span>[] filebyte = FileUploader.FileBytes;

    System.Data.Linq.Binary fileBinary = <span class="kwrd">new</span> System.Data.Linq.Binary(filebyte);
          MyDataDataContext MyData = <span class="kwrd">new</span> MyDataDataContext();

          MyData.ADDFILE(filename, fileBinary);
          lblStatus.Text = <span class="str">"File Uploaded Successfully!"</span>;

        }
}</pre>
<pre class="csharpcode"> </pre>
<pre class="csharpcode"> </pre>
<p>The Main thing to remember here is that we need to pass the FileUploader.FileBytes  to the constructor of <a href="http://msdn.microsoft.com/en-us/library/system.data.linq.binary.aspx" target="_blank">System.Data.Linq.Binary</a>.</p>
<p>To Learn more about LINQ to SQL Please visit <a href="http://weblogs.asp.net/scottgu/archive/2007/05/19/using-linq-to-sql-part-1.aspx" target="_blank">Here</a>.</p>
<p><!-- .csharpcode, .csharpcode pre { 	font-size: small; 	color: black; 	font-family: consolas, "Courier New", courier, monospace; 	background-color: #ffffff; 	/*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  { 	background-color: #f4f4f4; 	width: 100%; 	margin: 0em; } .csharpcode .lnum { color: #606060; } --></p>
<pre class="csharpcode"><strong><em> EDIT:</em></strong><em> Richie </em><em>just showed another way to achieve this in his blog </em><a href="http://hengrr.wordpress.com/2009/02/20/linq-to-sql-upload-binary-file/" target="_blank"><em>here</em></a><em>.</em></pre>
<pre class="csharpcode"> </pre>
<p><!-- .csharpcode, .csharpcode pre { 	font-size: small; 	color: black; 	font-family: consolas, "Courier New", courier, monospace; 	background-color: #ffffff; 	/*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  { 	background-color: #f4f4f4; 	width: 100%; 	margin: 0em; } .csharpcode .lnum { color: #606060; } --></p>
<p><!--adsense#InPostImage--></p>
<img src="http://www.aneef.net/?ak_action=api_record_view&id=39&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.aneef.net/2009/01/16/uploading-binary-files-or-images-using-linq-to-sql/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Compare and update XML File with the changes</title>
		<link>http://www.aneef.net/2008/10/30/compare-and-update-xml-file-with-the-changes/</link>
		<comments>http://www.aneef.net/2008/10/30/compare-and-update-xml-file-with-the-changes/#comments</comments>
		<pubDate>Thu, 30 Oct 2008 08:46:50 +0000</pubDate>
		<dc:creator>Aneef Fashir</dc:creator>
				<category><![CDATA[.Net Related]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[c#]]></category>

		<guid isPermaLink="false">http://www.aneef.net/2008/10/30/compare-and-update-xml-file-with-the-changes/</guid>
		<description><![CDATA[Recently I had a requirement to compare 2 XML Files, which has the existing and new settings of an application stored in them. what I wanted to do is when a new XML file of settings is arrived, I had to compare and retain the existing settings, and add any new ones if there are [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I had a requirement to compare 2 XML Files, which has the existing and new settings of an application stored in them. what I wanted to do is when a new XML file of settings is arrived, I had to compare and retain the existing settings, and add any new ones if there are any, remove any settings if they are removed in the new one. Mainly I needed to compare nodes as well as attributes.</p>
<p>Here are few suggestion I got from my friends and communities:</p>
<ol>
<li><a href="http://msdn.microsoft.com/en-us/library/aa302294.aspx" target="_blank">XML Diff Patch</a> &#8211; Couldn&#8217;t achieve what I wanted. </li>
<li><a href="http://msdn.microsoft.com/en-us/library/bb387098.aspx" target="_blank">Linq for XML</a> -&#160; I cannot use this as the application is developed under .net Framework 2.0 </li>
</ol>
<p>&#160;</p>
<p>So after Several Discussions and Forum Posts I Decided to Write one on my own. I don&#8217;t know whether it is the best, but it servers for my purpose. so just thought of sharing it with you all, as I saw there were a lot with the same problem. I know&#160; it needs some improvements such as comparing nested nodes and attributes. but&#160; this would be a better kick start. &quot;something is better than nothing&quot; right!!!.</p>
<p>&#160;</p>
<p>Here are two sample XML files which we can use for our comparison, and the output expected.</p>
<p>&#160;</p>
<p><u>Existing Settings</u></p>
<pre class="csharpcode">&lt;Properties xmlns:xsi=<span class="str"><a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a></span></pre>
<pre class="csharpcode"><span class="str"></span> xmlns:xsd=<span class="str">&quot;http://www.w3.org/2001/XMLSchema&quot;</span>&gt;
    &lt;Property Name=<span class="str">&quot;PerformanceType1&quot;</span> ProID=<span class="str">&quot;1&quot;</span> Text=<span class="str">&quot;Gross&quot;</span></pre>
<pre class="csharpcode"><span class="str"></span> Type=<span class="str">&quot;ddlb&quot;</span> Values=<span class="str">&quot;On|Off&quot;</span>&gt;On&lt;/Property&gt;
    &lt;Property Name=<span class="str">&quot;Benchmark1&quot;</span> ProID=<span class="str">&quot;3&quot;</span> Text=<span class="str">&quot;Benchmark 1&quot;</span> Type=<span class="str">&quot;ddlb&quot;</span></pre>
<pre class="csharpcode"><span class="str"></span> Values=<span class="str">&quot;N/A|2nd Security Index&quot;</span>&gt;N/A&lt;/Property&gt;
    &lt;Property Name=<span class="str">&quot;Benchmark2&quot;</span> ProID=<span class="str">&quot;4&quot;</span> Text=<span class="str">&quot;Benchmark 2&quot;</span> Type=<span class="str">&quot;ddlb&quot;</span></pre>
<pre class="csharpcode"><span class="str"></span> Values=<span class="str">&quot;N/A|2nd Security Index&quot;</span>&gt;N/A&lt;/Property&gt;
    &lt;Property Name=<span class="str">&quot;Region1&quot;</span> ProID=<span class="str">&quot;7&quot;</span> Text=<span class="str">&quot;Column 1&quot;</span> Type=<span class="str">&quot;ddlb&quot;</span> </pre>
<pre class="csharpcode">Values=<span class="str">&quot;N/A|1 Month|2 Month|3&quot;</span>&gt;1 Month&lt;/Property&gt;
    &lt;Property Name=<span class="str">&quot;FromDate1&quot;</span> ProID=<span class="str">&quot;8&quot;</span> Text=<span class="str">&quot;Column 1 From&quot;</span> </pre>
<pre class="csharpcode">Type=<span class="str">&quot;Date&quot;</span>&gt;N/A&lt;/Property&gt;
    &lt;Property Name=<span class="str">&quot;FromDate9&quot;</span> ProID=<span class="str">&quot;24&quot;</span> Text=<span class="str">&quot;Column 9 From&quot;</span> </pre>
<pre class="csharpcode">Type=<span class="str">&quot;Date&quot;</span>&gt;N/A&lt;/Property&gt;
&lt;/Properties&gt;</pre>
<style type="text/css">
<p>.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<p><u></u></p>
<p>&#160;</p>
<p><u>New Settings</u></p>
<pre class="csharpcode">&lt;Properties xmlns:xsi=<span class="str"><a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a></span> </pre>
<pre class="csharpcode">xmlns:xsd=<span class="str">&quot;http://www.w3.org/2001/XMLSchema&quot;</span>&gt;
    &lt;Property Name=<span class="str">&quot;PerformanceType1&quot;</span> ProID=<span class="str">&quot;1&quot;</span> Text=<span class="str">&quot;Gross&quot;</span></pre>
<pre class="csharpcode"><span class="str"></span> Type=<span class="str">&quot;ddlb&quot;</span> Values=<span class="str">&quot;On|Off&quot;</span>&gt;On&lt;/Property&gt;
    &lt;Property Name=<span class="str">&quot;Benchmark1&quot;</span> ProID=<span class="str">&quot;3&quot;</span> Text=<span class="str">&quot;Benchmark 1&quot;</span> </pre>
<pre class="csharpcode">Type=<span class="str">&quot;ddlb&quot;</span> Values=<span class="str">&quot;N/A|2nd Security Index&quot;</span>&gt;changed&lt;/Property&gt;
    &lt;Property Name=<span class="str">&quot;Benchmark2&quot;</span> ProID=<span class="str">&quot;4&quot;</span> Text=<span class="str">&quot;Benchmark 2&quot;</span> </pre>
<pre class="csharpcode">Type=<span class="str">&quot;ddlb&quot;</span> Values=<span class="str">&quot;N/A|2nd Security Index&quot;</span>&gt;N/A&lt;/Property&gt;
    &lt;Property Name=<span class="str">&quot;Region1&quot;</span> ProID=<span class="str">&quot;9&quot;</span> Text=<span class="str">&quot;Changed&quot;</span> </pre>
<pre class="csharpcode">Type=<span class="str">&quot;ddlb&quot;</span> Values=<span class="str">&quot;N/A|1 Month|2 Month|3&quot;</span>&gt;1 Month&lt;/Property&gt;
    &lt;Property Name=<span class="str">&quot;NewData&quot;</span> ProID=<span class="str">&quot;29&quot;</span> Text=<span class="str">&quot;Column 9 From&quot;</span> </pre>
<pre class="csharpcode">Type=<span class="str">&quot;Date&quot;</span>&gt;NewlyAdded&lt;/Property&gt;
    &lt;Property Name=<span class="str">&quot;FromDate9&quot;</span> ProID=<span class="str">&quot;24&quot;</span> Text=<span class="str">&quot;Column 9 From&quot;</span> </pre>
<pre class="csharpcode">Type=<span class="str">&quot;Date&quot;</span>&gt;N/A&lt;/Property&gt;
&lt;/Properties&gt;</pre>
<pre class="csharpcode">&#160;</pre>
<pre class="csharpcode"><u>Expected Output</u></pre>
<pre class="csharpcode"><u></u>&#160;</pre>
<pre class="csharpcode">&lt;Properties xmlns:xsi=<span class="str"><a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a></span></pre>
<pre class="csharpcode"><span class="str"></span> xmlns:xsd=<span class="str">&quot;http://www.w3.org/2001/XMLSchema&quot;</span>&gt;
    &lt;Property Name=<span class="str">&quot;PerformanceType1&quot;</span> ProID=<span class="str">&quot;1&quot;</span> Text=<span class="str">&quot;Gross&quot;</span> </pre>
<pre class="csharpcode">Type=<span class="str">&quot;ddlb&quot;</span> Values=<span class="str">&quot;On|Off&quot;</span>&gt;On&lt;/Property&gt;
    &lt;Property Name=<span class="str">&quot;Benchmark1&quot;</span> ProID=<span class="str">&quot;3&quot;</span> Text=<span class="str">&quot;Benchmark 1&quot;</span></pre>
<pre class="csharpcode"><span class="str"></span> Type=<span class="str">&quot;ddlb&quot;</span> Values=<span class="str">&quot;N/A|2nd Security Index&quot;</span>&gt;N/A&lt;/Property&gt;
    &lt;Property Name=<span class="str">&quot;Benchmark2&quot;</span> ProID=<span class="str">&quot;4&quot;</span> Text=<span class="str">&quot;Benchmark 2&quot;</span></pre>
<pre class="csharpcode"><span class="str"></span> Type=<span class="str">&quot;ddlb&quot;</span> Values=<span class="str">&quot;N/A|2nd Security Index&quot;</span>&gt;N/A&lt;/Property&gt;
    &lt;Property Name=<span class="str">&quot;Region1&quot;</span> ProID=<span class="str">&quot;9&quot;</span> Text=<span class="str">&quot;Changed&quot;</span></pre>
<pre class="csharpcode"><span class="str"></span> Type=<span class="str">&quot;ddlb&quot;</span> Values=<span class="str">&quot;N/A|1 Month|2 Month|3&quot;</span>&gt;1 Month&lt;/Property&gt;
    &lt;Property Name=<span class="str">&quot;FromDate9&quot;</span> ProID=<span class="str">&quot;24&quot;</span> Text=<span class="str">&quot;Column 9 From&quot;</span></pre>
<pre class="csharpcode"><span class="str"></span> Type=<span class="str">&quot;Date&quot;</span>&gt;N/A&lt;/Property&gt;
    &lt;Property Name=<span class="str">&quot;NewData&quot;</span> ProID=<span class="str">&quot;29&quot;</span> Text=<span class="str">&quot;Column 9 From&quot;</span></pre>
<pre class="csharpcode"><span class="str"></span> Type=<span class="str">&quot;Date&quot;</span>&gt;NewlyAdded&lt;/Property&gt;
&lt;/Properties&gt;</pre>
<pre class="csharpcode">&#160;</pre>
<pre class="csharpcode">&#160;</pre>
<pre class="csharpcode">&#160;</pre>
<p>And now Lets see how the code works:</p>
<pre class="csharpcode">&#160;</pre>
<pre class="csharpcode"><span class="kwrd">string</span> original = File.ReadAllText(<span class="str">@&quot;&lt;Original File path&gt;&quot;</span>);
<span class="kwrd">string</span> New = File.ReadAllText(<span class="str">@&quot;&lt;New File path&gt;&quot;</span>);
XmlCompare compare = <span class="kwrd">new</span> XmlCompare();
XmlDocument docs=compare.compare(original, New);
File.WriteAllText(<span class="str">@&quot;&lt;output path&gt;&quot;</span>, docs.OuterXml);</pre>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<pre class="csharpcode">&#160;</pre>
<pre class="csharpcode">&#160;</pre>
<p>The Implementation of the code and its functionality is given in the below download file, with inline comments.</p>
<p>Please note few values are hard coded in this class, but can be altered to suit the requirements.</p>
<p><strong><a href="http://www.aneef.net/wp-content/uploads/2008/10/XMLCompare.cs" target="_blank">XMLCompare.cs</a></strong></p>
<p>I hope it helps for a kick start!.</p>
<p>&#160;</p>
<pre class="csharpcode">&#160;</pre>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<p><!--adsense#InPostImage--></p>
<img src="http://www.aneef.net/?ak_action=api_record_view&id=38&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.aneef.net/2008/10/30/compare-and-update-xml-file-with-the-changes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
