<?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>Sumit Gupta</title>
	<atom:link href="http://www.sumitgupta.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sumitgupta.net</link>
	<description>bookmarking my life</description>
	<lastBuildDate>Wed, 18 Apr 2012 19:22:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>ASP.NET: Why my cookie is not saving</title>
		<link>http://www.sumitgupta.net/asp-net-why-my-cookie-is-not-saving/</link>
		<comments>http://www.sumitgupta.net/asp-net-why-my-cookie-is-not-saving/#comments</comments>
		<pubDate>Wed, 18 Apr 2012 19:22:08 +0000</pubDate>
		<dc:creator>Sumit Gupta</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#.NET]]></category>
		<category><![CDATA[VB.NET/VB]]></category>
		<category><![CDATA[Cookies]]></category>

		<guid isPermaLink="false">http://www.sumitgupta.net/?p=582</guid>
		<description><![CDATA[Funny, today after years I thought to finally use Cookies in one of my project. It is probably my first attempt to use Cookie in ASP.NET in last 5 yrs. WOW, that is amazing. Anyways, I just notice one thing and thought it might help any first timer, so here is the key note I [...]]]></description>
			<content:encoded><![CDATA[<p>Funny, today after years I thought to finally use Cookies in one of my project. It is probably my first attempt to use Cookie in ASP.NET in last 5 yrs. WOW, that is amazing. Anyways, I just notice one thing and thought it might help any first timer, so here is the key note I want to share. In ASP.NET if you want to read Cookie, use REQUEST.Cookies, but if you want to add new Cookie use RESPONSE.Cookies. This is very minor difference and I really waste 30 minutes before I release I was using Request.Cookies to add new cookie, but it won&#8217;t get added that way.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sumitgupta.net/asp-net-why-my-cookie-is-not-saving/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Mobile Detection</title>
		<link>http://www.sumitgupta.net/php-mobile-detection/</link>
		<comments>http://www.sumitgupta.net/php-mobile-detection/#comments</comments>
		<pubDate>Tue, 10 Apr 2012 06:57:52 +0000</pubDate>
		<dc:creator>Sumit Gupta</dc:creator>
				<category><![CDATA[Bookmarked]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Device Detection]]></category>
		<category><![CDATA[Mobile]]></category>

		<guid isPermaLink="false">http://www.sumitgupta.net/?p=577</guid>
		<description><![CDATA[Just a quick note, to detect the mobile/tablet/desktop this script looks promising : http://code.google.com/p/php-mobile-detect/ I try to detect it my Windows Mango phone, it does detect it as Mobile, though I hate that it doesn&#8217;t recognize Windows Mango yet. But looks promising and it is easier to implement it as well.]]></description>
			<content:encoded><![CDATA[<p>Just a quick note, to detect the mobile/tablet/desktop this script looks promising :<a href="http://code.google.com/p/php-mobile-detect/"> http://code.google.com/p/php-mobile-detect/</a> I try to detect it my Windows Mango phone, it does detect it as Mobile, though I hate that it doesn&#8217;t recognize Windows Mango yet. But looks promising and it is easier to implement it as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sumitgupta.net/php-mobile-detection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WKHTMLTOPDF: A Free PDF solution</title>
		<link>http://www.sumitgupta.net/wkhtmltopdf-a-free-pdf-solution/</link>
		<comments>http://www.sumitgupta.net/wkhtmltopdf-a-free-pdf-solution/#comments</comments>
		<pubDate>Wed, 28 Mar 2012 10:18:17 +0000</pubDate>
		<dc:creator>Sumit Gupta</dc:creator>
				<category><![CDATA[Article]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Bookmarked]]></category>
		<category><![CDATA[C#.NET]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[VB.NET/VB]]></category>
		<category><![CDATA[C# PDF]]></category>
		<category><![CDATA[FREE PDF]]></category>
		<category><![CDATA[HTML2PDF]]></category>

		<guid isPermaLink="false">http://www.sumitgupta.net/?p=573</guid>
		<description><![CDATA[As any other developer we often find it difficult to get a Website to print something accurately, specially when printing labels for mailing as they are outside the default print area for most browser and no client want to adjust or memorize the print setting to adjust them manually. Also it doesn&#8217;t make sense to [...]]]></description>
			<content:encoded><![CDATA[<p>As any other developer we often find it difficult to get a Website to print something accurately, specially when printing labels for mailing as they are outside the default print area for most browser and no client want to adjust or memorize the print setting to adjust them manually. Also it doesn&#8217;t make sense to relay on client to do adjustments.</p>
<p>So the only universal solution I found is.. of course PDF files. But how do I create PDF. Well easy enough use some library. I did that I use iTextPDF very good Library that works for my C# project well for couple of years. But then what is the problem now? Well iTextPDF is now have commercial license at ridiculous pricing in fact it is now most expensive to any other paid software. Yet another Open Source project going paid on success. </p>
<p>Also, there is a problem with library like iTextPDF that they need you to draw each and every element programmatically more often or not. And you find yourself caught in a web of long written code. I remember one of my report&#8217;s PDF generation code goes 1000 lines. I hate it. So, the best solution is to Generate PDF from a HTML source. We can handle HTML much better way and rather easily with our skills as web programmer. And even a designer in team can change PDF design giving time for programmer for other work. </p>
<p>In this regard I look for free alternative of iTEXTPDF, which does have HTML parser to generate PDF from HTML file, and my search for now ends on <a href="http://code.google.com/p/wkhtmltopdf/">http://code.google.com/p/wkhtmltopdf/</a> (wkhtmltopdf ) project. A Simple Executable that I can call from a my code to execute and it does the parsing. </p>
<p>It is not really a good idea to call it through web page, but we should create a Windows service and use it there, but I have successfully test it to work on web server with quite a load and at least with my limitation to access Windows Service I can live with it running through HTML page, after all my PDF is just 1-2 page and it works fine. Will post code for it some other day. But do try it if you want a good and quick solution to your problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sumitgupta.net/wkhtmltopdf-a-free-pdf-solution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Database Optimization</title>
		<link>http://www.sumitgupta.net/database-optimization/</link>
		<comments>http://www.sumitgupta.net/database-optimization/#comments</comments>
		<pubDate>Thu, 22 Mar 2012 19:25:05 +0000</pubDate>
		<dc:creator>Sumit Gupta</dc:creator>
				<category><![CDATA[Article]]></category>
		<category><![CDATA[Blog: My thoughts]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[MS SQL Server]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQlite]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Optimization]]></category>

		<guid isPermaLink="false">http://www.sumitgupta.net/?p=570</guid>
		<description><![CDATA[Well, most of program use database for their web application. Eventually all web application does have database. But how many of those web application really works good. Well quite few. I am in web programming for more than 7 years now and during these years I have seen lot of developers building website using PHP [...]]]></description>
			<content:encoded><![CDATA[<p>Well, most of program use database for their web application. Eventually all web application does have database. But how many of those web application really works good. Well quite few. I am in web programming for more than 7 years now and during these years I have seen lot of developers building website using PHP or ASP.NET or ASP or PERL using SQL SERVER, MYSQL, Oracle or other database, but I always have a sense of making best application than them. But today I when I look back I realise that I was bad at writing code and making application in my initial years. Not that I don&#8217;t want to write a good code, but the fact my approach was not right. Some of the important thing that I learn over the year based on my experience are listed below. However before that I want to tell that not just me but all of us have read them in books but most of us might not have used it thinking we don&#8217;t need it as things works otherwise as well. So major stuff are:</p>
<p>1. Fast Database</p>
<p>2. Object oriented Code</p>
<p>3. Serialize flow of application.</p>
<p>In this post I try to mention Only Fast database. Well with Fast database I do not mean to pick the Fastest database on planet through bookmark testing, nor does I mean to use heavy hardware to make database run faster. These two things can really make your database appears to be faster but not really fast. I often ask a question in forum that I have few million records to parse, and can the DB engine handle it. I always get one answer if a database cannot handle few million record why we really need it.</p>
<p>This was very true statement, but do you really facing problem when you have only half million record and your site start taking 20-30 second to access database ? If so, then welcome to my past world. Well don&#8217;t worry you don&#8217;t need new hardware, you need new approach of programming your software and most importantly you need better database structure.</p>
<p>Starting with most commonly used stuff and I guess most importantly forgotten stuff.. Indexes. Yes, this is most common solution to make your site fast. Okay, so you already have define primary key in your table and it auto create index for it, but still not good enough. Well you need to index columns that you have used in your search and or in Join. Making index of one column does help, but making index of combination of 2 columns make it much better in queries that use the search on those two fields. For example, if you are searching Employee Last Name and their City from Employee table, having index on LastName and City seperately produce result slower than having index on Lastname and city name.</p>
<p>Now moving to next part of it. I have a sql query that has Client Code and User code in seperate column and I have a text box that allow user to enter ClientCode &#8211; UserCode in there, and I have to search it in database. I got little lazy and what I did I took the Textbox value as it is and did something like</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">WHERE</span> ClientCode <span style="color: #66cc66;">+</span> <span style="color: #ff0000;">&quot;-&quot;</span> <span style="color: #66cc66;">+</span> UserCode <span style="color: #66cc66;">=</span> @MyClientCode</pre></td></tr></table></div>

<p>Now, this looks good and works well for me, but this is not a good approach of writing it. In where clause never do the combination of column like that. Search easy column seperately, i.e.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">WHERE</span> clientCode <span style="color: #66cc66;">=</span>@ClientCode <span style="color: #993333; font-weight: bold;">AND</span> UserCode <span style="color: #66cc66;">=</span>@UserCode</pre></td></tr></table></div>

<p>the difference make your search works 10-15 times faster if you tend to have lot of records.</p>
<p>Third thing that comes to my mind is normalization of database and then creating views with indexes on view to join them if needed. I often see that database is not normalized and lot of Text field are used to store combination of values. For example if you want to have a product in different category then make a table Product_category, which store product ID and CategoryID, instead of storing comma seperate category IDs in product table. This seems awkward at first to change, but advantages are real. You can search product on category much faster as only Integer values are compare against the Regular expression match in comma seperated values. You can index the value in relation table, but not in text field. This approach is very common in developer in sub continent. If I am not wrong 70% of sites I see from other developer has this mistake.</p>
<p>Above are some error in design of database I have seen and some of them I did at my start of career, but I change my approach and today I am handling database with more than 10-20 million entries easily. Infact my site took less than 1 sec to search with a three table join. I remember the old version of this join that took 15 secs. I did great optimization there.</p>
<p>Anyways, making a software is your work, making it great is your choice.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sumitgupta.net/database-optimization/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Internet: Fun or frustration.</title>
		<link>http://www.sumitgupta.net/internet-fun-or-frustration/</link>
		<comments>http://www.sumitgupta.net/internet-fun-or-frustration/#comments</comments>
		<pubDate>Mon, 05 Mar 2012 17:03:35 +0000</pubDate>
		<dc:creator>Sumit Gupta</dc:creator>
				<category><![CDATA[Blog: My thoughts]]></category>
		<category><![CDATA[Rants]]></category>

		<guid isPermaLink="false">http://www.sumitgupta.net/?p=566</guid>
		<description><![CDATA[Since the interception of Internet, human being is evolved as more social animal then before. With use of internet increasing among human it was become fairly easy to stay in touch with your loved one. However as soon as Internet crazy is about to reach its height, mobile phone aka smartphone really turn the table [...]]]></description>
			<content:encoded><![CDATA[<p>Since the interception of Internet, human being is evolved as more social animal then before. With use of internet increasing among human it was become fairly easy to stay in touch with your loved one. However as soon as Internet crazy is about to reach its height, mobile phone aka smartphone really turn the table in further fuel addition to social human being. However with Internet becoming an essential part of human life, getting a quality service is another tough call for them. It frustrate me most when my Internet is not working as compare to having a dead phone line. Need of quality service such as AT&amp;T,<a href="http://www.o2.co.uk/broadband/"> O2</a>, Verizon and other international player that provide quality Internet in mobile device are still very rare. It is even worst in country like India, where you expect service to be even better than those in most part of world.</p>
<p>With only less than 10% indian population is using Internet on daily basis, India still stand on top 5 internet using country. I have use quite a few internet service in recent past, but no real taker of quality of service. Even the most expensive service is just satisfactory and not really good. When I got my first smartphone, my excitement of using Internet on the go is vanished within 24 hrs, a 3G device was running less than 1MB/s speed having a 3G data plan on it.</p>
<p>India government has define some minimum speed limits, though those limits are way less than global standard and when it comes to quality of service they are even worst. Though, if I take a  look from what we have 5 years ago, it looks bit satisfactory. I remember I use Dial up connection as my first internet, and today I am using 2MB/s Speed on my desktop and 3G on my mobile device. Speed is good so as need of having speed. It took me 7 days to download a JDK in 1999, today it take me less 7 minutes to do so. It would be good, if quality of internet improve a little further, though I get 99% continued connectivity with my broadband connection, but having a consistent speed is big issue. Failing DNS is second major concern. Hope to get a better quality in next few months with evolution of need and standard supply/demand format of how economy works. If they provide speed/quality they will get demand and hence their supply increase their demand.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sumitgupta.net/internet-fun-or-frustration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Regasm 64bit or 32bit through Windows Installer in Visual Studio</title>
		<link>http://www.sumitgupta.net/regasm-64bit-or-32bit-through-windows-installer-in-visual-studio/</link>
		<comments>http://www.sumitgupta.net/regasm-64bit-or-32bit-through-windows-installer-in-visual-studio/#comments</comments>
		<pubDate>Thu, 01 Mar 2012 08:45:52 +0000</pubDate>
		<dc:creator>Sumit Gupta</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Automation]]></category>
		<category><![CDATA[C#.NET]]></category>
		<category><![CDATA[.NET 4.0]]></category>
		<category><![CDATA[32bit]]></category>
		<category><![CDATA[64bit]]></category>
		<category><![CDATA[Office]]></category>
		<category><![CDATA[Regasm]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>

		<guid isPermaLink="false">http://www.sumitgupta.net/?p=564</guid>
		<description><![CDATA[Well, nothing much to say, this article is taken from http://leon.mvps.org/DotNet/RegasmInstaller.html. Thanks Leon, just for my own bookmarking here are step. [Article is taken as it is from Leon's article.] Realising that I couldn&#8217;t be the only person who&#8217;s having this problem, I&#8217;ve decided to share the code to assist others. All you need to do [...]]]></description>
			<content:encoded><![CDATA[<p>Well, nothing much to say, this article is taken from <a href="http://leon.mvps.org/DotNet/RegasmInstaller.html">http://leon.mvps.org/DotNet/RegasmInstaller.html</a>. Thanks Leon, just for my own bookmarking here are step. [Article is taken as it is from Leon's article.]</p>
<p>Realising that I couldn&#8217;t be the only person who&#8217;s having this problem, I&#8217;ve decided to share the code to assist others. All you need to do is follow the below steps:</p>
<ul>
<li>In your main project (the one containing the class you want to register), right click the project file and select Add / New Item and select Installer Class. Call it something like clsRegisterDll.cs</li>
<li>In the designer that appears, click &#8216;Click here to switch to code view&#8217; or right click the clsRegisterDll.cs file in solution explorer and select View Code</li>
<li>Replace the code in the window with the code listed below, and make sure you change &#8216;YourNamespace&#8217;. This has to match with the namespace in the clsRegisterDll.Designer.cs file.</li>
<li>Compile your project</li>
<li>In your installer, make sure you have added your dll to the Application Folder, and then right-click the installer project and select View / Custom Actions</li>
<li>Right-click Install, and then click Add Custom Action</li>
<li>Double click on Application Folder, and then on your dll</li>
<li>Do the same for the Commit action</li>
<li>Build and test your installer</li>
<li>You should now have an installer that registers your dll using regasm /codebase.</li>
</ul>
<p>clsRegisterDll.cs:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.ComponentModel</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Configuration.Install</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #0600FF; font-weight: bold;">namespace</span> YourNamespace
<span style="color: #008000;">&#123;</span>
<span style="color: #008000;">&#91;</span>RunInstaller<span style="color: #008000;">&#40;</span><span style="color: #0600FF; font-weight: bold;">true</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span>
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">partial</span> <span style="color: #6666cc; font-weight: bold;">class</span> RegisterDll <span style="color: #008000;">:</span> Installer
<span style="color: #008000;">&#123;</span>
<span style="color: #0600FF; font-weight: bold;">public</span> RegisterDll<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
InitializeComponent<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span>
&nbsp;
<span style="color: #008000;">&#91;</span><span style="color: #000000;">System.<span style="color: #0000FF;">Security</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Permissions</span></span><span style="color: #008000;">.</span><span style="color: #0000FF;">SecurityPermission</span><span style="color: #008000;">&#40;</span><span style="color: #000000;">System.<span style="color: #0000FF;">Security</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Permissions</span></span><span style="color: #008000;">.</span><span style="color: #0000FF;">SecurityAction</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Demand</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span>
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">override</span> <span style="color: #6666cc; font-weight: bold;">void</span> Commit<span style="color: #008000;">&#40;</span><span style="color: #000000;">System.<span style="color: #0000FF;">Collections</span></span><span style="color: #008000;">.</span><span style="color: #0000FF;">IDictionary</span> savedState<span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
<span style="color: #0600FF; font-weight: bold;">base</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Commit</span><span style="color: #008000;">&#40;</span>savedState<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #008080; font-style: italic;">// Get the location of regasm</span>
<span style="color: #6666cc; font-weight: bold;">string</span> regasmPath <span style="color: #008000;">=</span> <span style="color: #000000;">System.<span style="color: #0000FF;">Runtime</span><span style="color: #008000;">.</span><span style="color: #0000FF;">InteropServices</span></span><span style="color: #008000;">.</span><span style="color: #0000FF;">RuntimeEnvironment</span><span style="color: #008000;">.</span><span style="color: #0000FF;">GetRuntimeDirectory</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">+</span> <span style="color: #666666;">@&quot;regasm.exe&quot;</span><span style="color: #008000;">;</span>
<span style="color: #008080; font-style: italic;">// Get the location of our DLL</span>
<span style="color: #6666cc; font-weight: bold;">string</span> componentPath <span style="color: #008000;">=</span> <span style="color: #008000;">typeof</span><span style="color: #008000;">&#40;</span>RegisterDll<span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Assembly</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Location</span><span style="color: #008000;">;</span>
<span style="color: #008080; font-style: italic;">// Execute regasm</span>
<span style="color: #000000;">System.<span style="color: #0000FF;">Diagnostics</span></span><span style="color: #008000;">.</span><span style="color: #0000FF;">Process</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Start</span><span style="color: #008000;">&#40;</span>regasmPath, <span style="color: #666666;">&quot;/codebase <span style="color: #008080; font-weight: bold;">\&quot;</span>&quot;</span> <span style="color: #008000;">+</span> componentPath <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;<span style="color: #008080; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span>
&nbsp;
<span style="color: #008000;">&#91;</span><span style="color: #000000;">System.<span style="color: #0000FF;">Security</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Permissions</span></span><span style="color: #008000;">.</span><span style="color: #0000FF;">SecurityPermission</span><span style="color: #008000;">&#40;</span><span style="color: #000000;">System.<span style="color: #0000FF;">Security</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Permissions</span></span><span style="color: #008000;">.</span><span style="color: #0000FF;">SecurityAction</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Demand</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span>
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">override</span> <span style="color: #6666cc; font-weight: bold;">void</span> Install<span style="color: #008000;">&#40;</span><span style="color: #000000;">System.<span style="color: #0000FF;">Collections</span></span><span style="color: #008000;">.</span><span style="color: #0000FF;">IDictionary</span> stateSaver<span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
<span style="color: #0600FF; font-weight: bold;">base</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Install</span><span style="color: #008000;">&#40;</span>stateSaver<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sumitgupta.net/regasm-64bit-or-32bit-through-windows-installer-in-visual-studio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Excel Automation Add-In for Office 64bit Check List</title>
		<link>http://www.sumitgupta.net/excel-automation-add-in-for-office-64bit-check-list/</link>
		<comments>http://www.sumitgupta.net/excel-automation-add-in-for-office-64bit-check-list/#comments</comments>
		<pubDate>Sat, 25 Feb 2012 11:33:35 +0000</pubDate>
		<dc:creator>Sumit Gupta</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Automation]]></category>
		<category><![CDATA[C#.NET]]></category>
		<category><![CDATA[VB.NET/VB]]></category>
		<category><![CDATA[64bit]]></category>
		<category><![CDATA[Add-Ins]]></category>
		<category><![CDATA[Automation Add-In]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[Excel 2010]]></category>
		<category><![CDATA[Office 2010]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>

		<guid isPermaLink="false">http://www.sumitgupta.net/?p=560</guid>
		<description><![CDATA[After days of research, hit and trail; today I finally got a working 64bit Excel Automation Add-In. I am using Visual Studio 2010 [.NET 4.0 client profile framework].  1. Create a Project using Visual Studio Office 2010 template &#8220;Excel 2010 Add-In&#8221;. [I opt for this as I need Ribbon UI too, if you don't need [...]]]></description>
			<content:encoded><![CDATA[<p>After days of research, hit and trail; today I finally got a working 64bit Excel Automation Add-In. I am using Visual Studio 2010 [.NET 4.0 client profile framework]. </p>
<p>1. Create a Project using Visual Studio Office 2010 template &#8220;Excel 2010 Add-In&#8221;. [I opt for this as I need Ribbon UI too, if you don't need that you can use Class library project as well]</p>
<p>2. Create a New class and follow this article from Eric ( <a href="http://blogs.msdn.com/b/eric_carter/archive/2004/12/01/273127.aspx">Excel Automation AddIn in Visual studio</a> ). This article covers 95% of stuff you need it to work. Thanks Eric your article is still valid after 3 yrs and new version than those mention there.</p>
<p>3. Make sure you, have a Signed Assembly. I am not sure if it is really true, but when I was manually registering my assembly in failed cases, it warn me to sign them, though it says &#8220;registration succeed&#8221;.</p>
<p>4. Good thing is I am creating Add-IN using 32bit machine, and even though my addin works for 64bit. I do not define any specific CPU, just use ANYCPU flag where applicable.</p>
<p>5. Make sure you do not check &#8220;Make COM Visible&#8221; under Advance setting of your Assembly properties. Again I am not sure, if it is true, but it works when I have it OFF.</p>
<p>6. Do not check &#8220;Register for COM&#8221; under the BUILD Tab of Project property in Visual Studio. We need to manually register using 64bit regasm through our Setup or command line as you like.</p>
<p>7. [Guess not important or relevant], I have by default Sign for ClickOnce mainfest enable. Actually it is enable for Template project by Visual studio. I keep it that way, doesn&#8217;t harm to have it.</p>
<p>8. Make sure to create a good GUID for Class definition as define in article. There is another GUID used in Assembly information, I try to match them and it didn&#8217;t work. When it works they have different GUID. Though have it same or different should make difference according to me.</p>
<p>9. I define a ProgID on top of my class like</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #008000;">&#91;</span>ProgId<span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;EVA.Excel&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span>
<span style="color: #008000;">&#91;</span>Guid<span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;A4C56D50-D25D-41BA-AE3E-9BE5A56736D3&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span>
<span style="color: #008000;">&#91;</span>ClassInterface<span style="color: #008000;">&#40;</span>ClassInterfaceType<span style="color: #008000;">.</span><span style="color: #0000FF;">AutoDual</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span>
<span style="color: #008000;">&#91;</span>ComVisible<span style="color: #008000;">&#40;</span><span style="color: #0600FF; font-weight: bold;">true</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span>
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">class</span> Sound
&nbsp;
<span style="color: #008000;">&#123;</span>
&nbsp;
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>I guess that is all what I make changes and have it working. Best of luck.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sumitgupta.net/excel-automation-add-in-for-office-64bit-check-list/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sandcastle: Code Documentation in C#</title>
		<link>http://www.sumitgupta.net/sandcastle-code-documentation-in-c/</link>
		<comments>http://www.sumitgupta.net/sandcastle-code-documentation-in-c/#comments</comments>
		<pubDate>Fri, 24 Feb 2012 11:59:24 +0000</pubDate>
		<dc:creator>Sumit Gupta</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#.NET]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[Sandcastle]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>

		<guid isPermaLink="false">http://www.sumitgupta.net/?p=557</guid>
		<description><![CDATA[Over the years I use lot of documentation and those help me build my software with ease. However, never need to build one for my projects as they are not quite often big and what more never need to do so, as they are quite handful of function in complete project. But now in order [...]]]></description>
			<content:encoded><![CDATA[<p>Over the years I use lot of documentation and those help me build my software with ease. However, never need to build one for my projects as they are not quite often big and what more never need to do so, as they are quite handful of function in complete project. But now in order to upgrade my coding and making it more friendly for my brain. I finally was looking for a decent method to start documenting my code in separate code files much like PHP or MSDN documentation. </p>
<p>The best was to start with .NET documentation tools as they are more readily available. After searching and trying to make sense what all these tools are good for, I finally reach to Sandcastle. Install it, but found nothing in my start menu. Read about it, seems a command line tool. But I need GUI, been a lazy programmer. Well I got the answer in term of Sandcastle Help File Builder on Codeplex (<a href="http://shfb.codeplex.com/">http://shfb.codeplex.com/</a>) . Looks promising, I install it. And within 3 minute of installation, my documentation is ready. How?</p>
<p>Simple. I open the software, Add Documentation Source as my project SLN file, click build and it create file for me. I need nothing else. There maybe lot of configuration to do, but for first time, it is more than enough. I have been commeting my code day I start programming. And from about a year or so, I start using those /// commenting as in XML generation tool within Visual Studio. But never compile them in help file. </p>
<p>Now I know easiest method to do. i.e. open Builder GUI, click build [For second time of course]. I will keep generating lot of help file so I can check them back when needed in future. Changing my programming style when nobody is there to talk or see face to face is enjoyable. Me and my computer sitting alone and doing lot of new learning. Going back to days of programmer is really good to continue my learning process that I left 4 years ago.</p>
<p>I am still good and hope to improve further.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sumitgupta.net/sandcastle-code-documentation-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Are you Marketing or spamming?</title>
		<link>http://www.sumitgupta.net/are-you-marketing-or-spamming/</link>
		<comments>http://www.sumitgupta.net/are-you-marketing-or-spamming/#comments</comments>
		<pubDate>Sat, 11 Feb 2012 14:08:41 +0000</pubDate>
		<dc:creator>Sumit Gupta</dc:creator>
				<category><![CDATA[Article]]></category>
		<category><![CDATA[Blog: My thoughts]]></category>

		<guid isPermaLink="false">http://www.sumitgupta.net/?p=553</guid>
		<description><![CDATA[Today I delete bulk of comment on blog moderation list. These guys took some effort to put their comment and I delete it. Because they are not commenting on article or entry, they are simply marketing their stuff. There is often such comment you will find on your websites, but is this marketting really useful [...]]]></description>
			<content:encoded><![CDATA[<p>Today I delete bulk of comment on blog moderation list. These guys took some effort to put their comment and I delete it. Because they are not commenting on article or entry, they are simply marketing their stuff. There is often such comment you will find on your websites, but is this marketting really useful to post such comments to personnel blog or company websites.</p>
<p><cite>Hello, I am Mr. X and can help you get top rank on Google Search result. Try our SEO service.</cite></p>
<p>I got these message very often, but hey I am already on top 10 results for keywords I want. Did you ever research that ? More over, this is not a business site, so why I want anyone to find my blog. I write it for my pleasure of sharing. If someone need my blog they always find it anyways.</p>
<p>If you are really wanting to market your service, there are certain rules to follow: <span id="more-553"></span></p>
<p>1. Be ethical, yes that is most important rule of marketing. Often we see marketing or sales representative are great liar. They sale their stuff on false promise, if I am not wrong every person on this world have atleast got in this trap for something. But is it really worth. I say no. I do my 80% of business from repeat client. If I ever lie to them, will they trust me next time? Answer is ofcourse No. Don&#8217;t sell on what is not true about your product.</p>
<p>2. Be realistic, if you are promising that is not possible for you don&#8217;t promise it. Believe me there are 1000 other factor which anyways can make your promise fall, but if you want to increase that number to +1 it is always your choice. This choice is very disastraous as it is human fault.  Your fault.</p>
<p>3. Say less do more. I learn this hard way. In my early days I often promise what I want to deliver then client came up with something in addition and I end up on low budget as I not always able to increase price on changes they want because they simply says, &#8220;You misunderstood our need before, we never ask that feature, but this feature&#8221;. Because a feature that you think is their need they do not realise it until they use it, but they do see it as waste of money until a sign off took place. So I now do not tell the hidden feature of my software until they ask for it. I have to give it to them, but since they do not see it as part of pricing, they never complain about it. But thanks me later for my Great work as they are not expecting those. This help me gain some trust from them as they know I understand their need much better they do. They realise their demand can be inadequate to their need, but my decision for them will not be. What else they need. I am not a outsource developer for them, I am their inhouse manager who is doing part of his job.</p>
<p>4. Never compete. Again I think it is eyebrow raising quote, but it is true for me. Whenever a client ask me that certain company or developer is doing it for X amount or with Y feature or both. I said, Okay use his service, but when these feature doesn&#8217;t meet your requirement, I start my suggested solution for you at price applicable at that time [inflation you see, otherwise no change]. I do not suggest to reduce feature or price because someone else is doing so. Though to fit in client feature we discuss to reduce feature, but not out of competition. You might be wondering why, because each company or person has its own expenses and each client have its own need and budget. If a client is not of your budget today, will he be in future long run? If not why invest on him today?</p>
<p>You always have the choice to just sell your product or get hired with your skills. I got hired, always. I have high success rate in marketing as I never spent anything on marketing or I never really have to market. My clients are my market, they trust me is enough for me, they get me business, they market for me, I do not for me.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sumitgupta.net/are-you-marketing-or-spamming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Short Note: Colorbox moving Close button on Top right</title>
		<link>http://www.sumitgupta.net/short-note-colorbox-moving-close-button-on-top-right/</link>
		<comments>http://www.sumitgupta.net/short-note-colorbox-moving-close-button-on-top-right/#comments</comments>
		<pubDate>Wed, 08 Feb 2012 11:23:48 +0000</pubDate>
		<dc:creator>Sumit Gupta</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Colorbox]]></category>
		<category><![CDATA[Lightbox]]></category>
		<category><![CDATA[UI]]></category>

		<guid isPermaLink="false">http://www.sumitgupta.net/?p=550</guid>
		<description><![CDATA[By default Colorbox Close button is on Bottom Right. However moving it back to top is as simple as changing Position of div from bottom to top. All I have done is change bottom: x to top: x for all child of cboxContent class. which include cboxLoadedContent, cboxTitle, cboxCurrent, cboxSlideshow, ,cboxPrevious ,cboxNext,cboxClose Note for myself, and those who find it [...]]]></description>
			<content:encoded><![CDATA[<p>By default Colorbox Close button is on Bottom Right. However moving it back to top is as simple as changing Position of div from bottom to top. All I have done is change bottom: x to top: x for all child of cboxContent class. which include cboxLoadedContent, cboxTitle, cboxCurrent, cboxSlideshow, ,cboxPrevious ,cboxNext,cboxClose</p>
<p>Note for myself, and those who find it useful.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sumitgupta.net/short-note-colorbox-moving-close-button-on-top-right/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Case Sensitive Search in SQL Server</title>
		<link>http://www.sumitgupta.net/case-sensitive-search-in-sql-server/</link>
		<comments>http://www.sumitgupta.net/case-sensitive-search-in-sql-server/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 19:23:36 +0000</pubDate>
		<dc:creator>Sumit Gupta</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[MS SQL Server]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[COLLATE]]></category>
		<category><![CDATA[Password Protection]]></category>
		<category><![CDATA[Search]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.sumitgupta.net/?p=546</guid>
		<description><![CDATA[Mysql mostly provide a Case sensitive search because of its default collate configuration. However SQL server use different collate and hence by default it is not case sensitive. It is good to not having case sensitive search by default, as except password compare you most often doesn&#8217;t need case sensitive search. Do you? well I [...]]]></description>
			<content:encoded><![CDATA[<p>Mysql mostly provide a Case sensitive search because of its default collate configuration. However SQL server use different collate and hence by default it is not case sensitive. It is good to not having case sensitive search by default, as except password compare you most often doesn&#8217;t need case sensitive search. Do you? well I never really need that, anyways. Those who wonder how they can get case sensitive search should look this good article</p>
<p><a href="http://blog.sqlauthority.com/2007/04/30/case-sensitive-sql-query-search/">http://blog.sqlauthority.com/2007/04/30/case-sensitive-sql-query-search/</a></p>
<p>It simply case to change the collate value of column for which you want to get case sensitivity, by defining COLLATE Latin1_General_CS_AS to field declaration.</p>
<p>You can check existing collate of each field using </p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">EXEC</span> sp_help <span style="color: #66cc66;">&#91;</span>tablename<span style="color: #66cc66;">&#93;</span></pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">ALTER</span> <span style="color: #993333; font-weight: bold;">TABLE</span> <span style="color: #66cc66;">&#91;</span>tablename<span style="color: #66cc66;">&#93;</span> <span style="color: #993333; font-weight: bold;">ALTER</span> <span style="color: #993333; font-weight: bold;">COLUMN</span> Password <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">32</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">COLLATE</span> Latin1_General_CS_AS</pre></td></tr></table></div>

<p>However why are you wondering for case sensitive for password field? aren&#8217;t you doing MD5 or other conversion on your password for security already ? <img src='http://www.sumitgupta.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . </p>
]]></content:encoded>
			<wfw:commentRss>http://www.sumitgupta.net/case-sensitive-search-in-sql-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HostGator: Impressed me, but still not good</title>
		<link>http://www.sumitgupta.net/hostgator-impressed-me-but-still-not-good/</link>
		<comments>http://www.sumitgupta.net/hostgator-impressed-me-but-still-not-good/#comments</comments>
		<pubDate>Wed, 14 Dec 2011 10:01:03 +0000</pubDate>
		<dc:creator>Sumit Gupta</dc:creator>
				<category><![CDATA[Blog: My thoughts]]></category>

		<guid isPermaLink="false">http://www.sumitgupta.net/?p=543</guid>
		<description><![CDATA[After a very bad experience in hosting service and try like of godaddy, 1and1, bluehost and few other, I finally reach HostGator. They are still a traditional hosting provider but at least their server works. It is not that you cannot find a good hosting then hostGator, but comparing to $$ spend on hosting decide [...]]]></description>
			<content:encoded><![CDATA[<p>After a very bad experience in hosting service and try like of godaddy, 1and1, bluehost and few other, I finally reach HostGator. They are still a traditional hosting provider but at least their server works. It is not that you cannot find a good hosting then hostGator, but comparing to $$ spend on hosting decide the quality a lot. I use company like Rackspace and Hosting.com, they are really what a quality hosting should be, but considering their fee, it is not reachable to every day to day client. </p>
<p>However, I use their USA server and it was not quite good, maybe too much overloaded, though for my blog I use their Indian Server and since it is new server and probably not so much loaded yet, it works great for me from last 3 months. They have down time of about 10-15 minute here and there, maybe server just get too overloaded at time, been a shared hosting server, but otherwise it is normally a good speed. My clients are happy that my project management system finally works for them, and this is great achievement in itself.</p>
<p>Anyways, my new working environment is going solid. Increase my productivity a lot just waiting for good results to come with time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sumitgupta.net/hostgator-impressed-me-but-still-not-good/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Akismet Plugin : Great stats</title>
		<link>http://www.sumitgupta.net/akismet-plugin-great-stats/</link>
		<comments>http://www.sumitgupta.net/akismet-plugin-great-stats/#comments</comments>
		<pubDate>Tue, 15 Nov 2011 19:01:09 +0000</pubDate>
		<dc:creator>Sumit Gupta</dc:creator>
				<category><![CDATA[Joyous]]></category>
		<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://www.sumitgupta.net/?p=539</guid>
		<description><![CDATA[Just look at my Stats counter and it show about 6500 spam comments been posted on my blog so far in 1 year time span. This is small number as compare to page visit per day on blog, but still looks like lot of people try to spam me. Phew I am somewhat safe till [...]]]></description>
			<content:encoded><![CDATA[<p>Just look at my Stats counter and it show about 6500 spam comments been posted on my blog so far in 1 year time span. This is small number as compare to page visit per day on blog, but still looks like lot of people try to spam me. Phew I am somewhat safe till date.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sumitgupta.net/akismet-plugin-great-stats/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Future: undecided</title>
		<link>http://www.sumitgupta.net/new-future-undecided/</link>
		<comments>http://www.sumitgupta.net/new-future-undecided/#comments</comments>
		<pubDate>Sat, 05 Nov 2011 09:48:25 +0000</pubDate>
		<dc:creator>Sumit Gupta</dc:creator>
				<category><![CDATA[Blog: My thoughts]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[Rant]]></category>

		<guid isPermaLink="false">http://www.sumitgupta.net/?p=537</guid>
		<description><![CDATA[Been involve in technical field, I have encounter lot of technical hurdles. There has been some new problem always, and I somehow manage to escape them by solving those problem. Though not all problems are solvable is what I learn overtime and you need to take different route to nullify the effect of such things. [...]]]></description>
			<content:encoded><![CDATA[<p>Been involve in technical field, I have encounter lot of technical hurdles. There has been some new problem always, and I somehow manage to escape them by solving those problem. Though not all problems are solvable is what I learn overtime and you need to take different route to nullify the effect of such things. In last 3 years, I had a good time with all freedom I enjoying working on project that I love to and try to finish and accomplish them with my methods. It has been a great evolution process for my knowledge.</p>
<p>Though it doesn&#8217;t seems as comfortable now, as the difference between me and my dream has grown bigger. My dream is around building a team of technical person help or work with me to achieve goals we set. We want to achieve the standards we set over other counterpart of ours. Though the term team seems to be the biggest challenge to get at this stage. With economy going no where, finding good person is becoming equally hard. About 18 months ago, you will find all sort of talent around you, but now I see a downside which is effective by two things mainly:</p>
<p>1. No one is willing to take responsibility of work. It is not that this is uncommon thing to human, but it has increased a level where you just cannot trust your employee to any degree. Even if you pay them double the salary, but they know they are just employee and one day they use your double salary to get hired in another company with even more money.</p>
<p>2. Freedom from work, eventually you will read on internet or articles in magazine that people look for freedom at work, but I said they look for freedom from work. If you don&#8217;t ask them to follow your well tested methodology and don&#8217;t ask them to finish in time, they are happy to work for you, but otherwise they says we need freedom to work our way and hence they don&#8217;t like you.</p>
<p>These unfriendly act of candidate here leave me in two mind to go with them or not to go with them. I see some of them does has good thinking brain, but they are not willing to work. I can make good software but I am not god to make good human.</p>
<p>Always in search of good developer who help me go along, but I decide not to work with one who is not more than an employee. I will now work for great peoples only, either they are my client or my team members. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.sumitgupta.net/new-future-undecided/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>GDI+ Generic Error</title>
		<link>http://www.sumitgupta.net/gdi-generic-error/</link>
		<comments>http://www.sumitgupta.net/gdi-generic-error/#comments</comments>
		<pubDate>Tue, 11 Oct 2011 08:28:54 +0000</pubDate>
		<dc:creator>Sumit Gupta</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#.NET]]></category>
		<category><![CDATA[VB.NET/VB]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[GDI+]]></category>
		<category><![CDATA[Generic Error]]></category>

		<guid isPermaLink="false">http://www.sumitgupta.net/?p=534</guid>
		<description><![CDATA[I see lot of people asking about GDI+ Generic Error. Since this is &#8220;generic&#8221; error nobody can tell what is wrong with code. So did a work around and get it working. I had this error quite a time in early days of my programming and just found same error in one of junior&#8217;s code. [...]]]></description>
			<content:encoded><![CDATA[<p>I see lot of people asking about GDI+ Generic Error. Since this is &#8220;generic&#8221; error nobody can tell what is wrong with code. So did a work around and get it working. I had this error quite a time in early days of my programming and just found same error in one of junior&#8217;s code. Well from my experience I can say one thing. GDI+ Generic error 99.9% means &#8220;developer miss a detail or overlooked something&#8221;. Most common reason of error are negligence of</p>
<p>1. Path should be physical path</p>
<p>2. All folder should present before you create file.</p>
<p>3. Previous files should be in write mode if case of overriding files.</p>
<p>4. Make sure permission are for writing to User of process.</p>
<p>5. Do not include any special character which windows do not permit in folder name or file name.</p>
<p>6. FILE FORMAT has nothing to do with this error most often.</p>
<p>7. Recheck permission if you try all above.</p>
<p>8. Recheck Path again <img src='http://www.sumitgupta.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>Point #7 and #8 are most important solution and always works for me.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sumitgupta.net/gdi-generic-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

