<?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/"
	>

<channel>
	<title>codehutch.com</title>
	<atom:link href="http://codehutch.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://codehutch.com</link>
	<description>Online Code Repository</description>
	<pubDate>Wed, 30 Sep 2009 09:35:08 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>CreateUserWizard Error: &#8220;The parameter &#8216;username&#8217; must not be empty.&#8221;</title>
		<link>http://codehutch.com/2009/09/createuserwizard-error-the-parameter-username-must-not-be-empty/</link>
		<comments>http://codehutch.com/2009/09/createuserwizard-error-the-parameter-username-must-not-be-empty/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 09:35:08 +0000</pubDate>
		<dc:creator>ikaruga</dc:creator>
		
		<category><![CDATA[ASP.NET]]></category>

		<guid isPermaLink="false">http://codehutch.com/?p=144</guid>
		<description><![CDATA[To assign a role to a new user, we usually use the following code. We call this on the CreatedUser event of the ASP.NET CreateUserWizard Control:
protected void CreatedUser(object sender, EventArgs e)  {
Roles.AddUserToRole(cuwRegister.UserName, &#8220;Registered User&#8221;);
}
The code worked fine for me but not when I customized the CreateUserWizard Control where I encountered this error:
The parameter &#8216;username&#8217; [...]]]></description>
			<content:encoded><![CDATA[<p>To assign a role to a new user, we usually use the following code. We call this on the CreatedUser event of the ASP.NET CreateUserWizard Control:</p>
<blockquote><p>protected void CreatedUser(object sender, EventArgs e)  {<br />
Roles.AddUserToRole(<strong>cuwRegister.UserName</strong>, &#8220;Registered User&#8221;);<br />
}</p></blockquote>
<p>The code worked fine for me but not when I customized the CreateUserWizard Control where I encountered this error:</p>
<blockquote><p>The parameter &#8216;username&#8217; must not be empty.<br />
Parameter name: username</p></blockquote>
<p>For some reason, the <strong>cuwRegister.UserName</strong> gives an empty string thus the error. So I used the FindControl method to access the UserName textbox:</p>
<blockquote><p>TextBox userName = (TextBox)cuwRegister.CreateUserStep.ContentTemplateContainer.FindControl(&#8221;UserName&#8221;);<br />
Roles.AddUserToRole(userName.Text, &#8220;Registered User&#8221;);</p></blockquote>
<p>To learn how to customize the CreateUserWizard Control, go to <a title="Customize the ASP.NET CreateUserWizard Control" href="http://msdn.microsoft.com/en-us/library/ms178342.aspx" target="_self">MSDN</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://codehutch.com/2009/09/createuserwizard-error-the-parameter-username-must-not-be-empty/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Get Return Value of Stored Procedure with SubSonic</title>
		<link>http://codehutch.com/2009/09/get-return-value-of-stored-procedure-with-subsonic/</link>
		<comments>http://codehutch.com/2009/09/get-return-value-of-stored-procedure-with-subsonic/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 09:45:24 +0000</pubDate>
		<dc:creator>ikaruga</dc:creator>
		
		<category><![CDATA[ASP.NET]]></category>

		<category><![CDATA[dashCommerce 3.0.1]]></category>

		<guid isPermaLink="false">http://codehutch.com/?p=121</guid>
		<description><![CDATA[Some tasks are just too complicated for dynamic query building and/or require a greater level of control. To handle this, SubSonic supports stored procedures. Each stored procedure will produce an equivalent static method in the class defined in the configuration file. By default this is SPs. Each method will have one parameter for each stored [...]]]></description>
			<content:encoded><![CDATA[<p>Some tasks are just too complicated for dynamic query building and/or require a greater level of control. To handle this, SubSonic supports stored procedures. Each stored procedure will produce an equivalent static method in the class defined in the configuration file. By default this is SPs. Each method will have one parameter for each stored procedure parameter and return a StoredProcedure object.</p>
<blockquote><p>SubSonic.StoredProcedure sp = SPs.CustOrderHist(customerID);</p></blockquote>
<p>If you have created new stored procedures, read my post on how to:<br />
<strong><a title="Add New Stored Procedures to dashCommerce" href="http://codehutch.com/2009/09/add-new-stored-procedures-to-dashcommerce/" target="_self">Add New Stored Procedures to dashCommerce</a></strong></p>
<p>Now that SubSonic recognizes your custom stored procedures, the next question is how to access/get their return value?</p>
<p><span id="more-121"></span><br />
To get the return value of this stored procedure with subsonic we need to add a return parameter to the stored procedure. To do this, we use the AddReturnParameter method of the stored procedure&#8217;s command object.</p>
<blockquote><p>ex. sp.command.AddReturnParameter();</p></blockquote>
<p>The following code adds a return parameter, executes the stored procedure and assigns the return value to a variable.</p>
<blockquote><p>Subsonic.StoredProcedure sp = MettleSystems.dashCommerce.Store.SPs.EmailExists(txtEmail.Text);<br />
// There is also a MettleSystems.dashCommerce.Core.SPs in dashCommerce<br />
// SPs is an ambiguous reference<br />
sp.Command.AddReturnParameter();<br />
sp.Execute();<br />
string spResult = sp.Command.Parameters.Find(delegate(QueryParameter qp) {<br />
return qp.Mode == ParameterDirection.ReturnValue;<br />
}).ParameterValue.ToString();</p>
<p>byte result = Convert.ToByte(spResult);</p></blockquote>
<p>In the above code I used the EmailExists function generated by SubSonic to execute the stored procedure, dashCommerce_Store_EmailExists, which returns a byte.</p>
<p>Thanks to:  <a title="Mayank's Blog" href="http://mkchampaneri.wordpress.com/2008/01/12/access-return-value-of-stored-procedure-in-subsonic/" target="_blank">Mayank&#8217;s Blog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://codehutch.com/2009/09/get-return-value-of-stored-procedure-with-subsonic/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Add New Stored Procedures to dashCommerce</title>
		<link>http://codehutch.com/2009/09/add-new-stored-procedures-to-dashcommerce/</link>
		<comments>http://codehutch.com/2009/09/add-new-stored-procedures-to-dashcommerce/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 08:57:07 +0000</pubDate>
		<dc:creator>ikaruga</dc:creator>
		
		<category><![CDATA[ASP.NET]]></category>

		<category><![CDATA[dashCommerce 3.0.1]]></category>

		<guid isPermaLink="false">http://codehutch.com/?p=126</guid>
		<description><![CDATA[All stored procedures included in the configuration file (Store/App.config) have an equivalent static method in: Store/Models/Generated/StoredProcedures.cs
When I was new to dashCommerce I didn&#8217;t figure this out right away.
If you created new stored procedures, you need to update this SubSonic-generated StoredProcedure class to include your new stored procedures. To do so, modify the configuration file, look [...]]]></description>
			<content:encoded><![CDATA[<p>All stored procedures included in the configuration file (Store/App.config) have an equivalent static method in: <strong>Store/Models/Generated/StoredProcedures.cs</strong></p>
<p>When I was new to <a title="dashCommerce - An ASP.NET Open Source e-Commerce Application" href="http://www.dashCommerce.org" target="_blank">dashCommerce</a> I didn&#8217;t figure this out right away.</p>
<p>If you created new stored procedures, you need to update this SubSonic-generated StoredProcedure class to include your new stored procedures. To do so, modify the configuration file, look for the &#8220;<strong>includeProcedureList</strong>&#8221; attribute. Add the names of your new stored procedures in the list. Notice this line:</p>
<blockquote><p>stripSPText=&#8221;dashCommerce_Store_&#8221;</p></blockquote>
<p><span id="more-126"></span><br />
I&#8217;m not sure if it will still work fine if your stored procedure&#8217;s name doesn&#8217;t have that prefix. </p>
<blockquote><p><strong>stripSPText</strong> value: string default: [Empty] A comma-seperated list of values that should be stripped from stored procedure names when generating classes. The strip operation is performed using Regex.Replace(), so basic Regular Expression syntax is supported ~<a title="SubSonic" href="http://subsonicproject.com" target="_blank">subsonicproject.com</a></p></blockquote>
<p>When you&#8217;re done with the configuration file, run the SubSonic DAL. Then each of the newly included stored procedures should now have a function like the following in the <strong>StoredProcedures.cs</strong>:</p>
<blockquote><p>/// &lt;summary&gt;<br />
/// Creates an object wrapper for the dashCommerce_Store_EmailExists Procedure<br />
/// &lt;/summary&gt;<br />
public static StoredProcedure EmailExists(string Email)<br />
{<br />
SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure(&#8221;dashCommerce_Store_EmailExists&#8221;, DataService.GetInstance(&#8221;dashCommerceProvider&#8221;));</p>
<p>sp.Command.AddParameter(&#8221;@Email&#8221;, Email, DbType.String);</p>
<p>return sp;<br />
}</p></blockquote>
<p>Of course you can also do it manually, as what I&#8217;ve been doing before I discovered the &#8220;official way&#8221; of doing it. Just be careful not to overwrite this file with the one generated by SubSonic as it won&#8217;t include your manual edits.</p>
]]></content:encoded>
			<wfw:commentRss>http://codehutch.com/2009/09/add-new-stored-procedures-to-dashcommerce/feed/</wfw:commentRss>
		</item>
		<item>
		<title>&#8216;Invalid postback or callback argument&#8217; Error in DataList</title>
		<link>http://codehutch.com/2009/09/invalid-postback-or-callback-argument-error-in-datalist/</link>
		<comments>http://codehutch.com/2009/09/invalid-postback-or-callback-argument-error-in-datalist/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 07:44:03 +0000</pubDate>
		<dc:creator>ikaruga</dc:creator>
		
		<category><![CDATA[ASP.NET]]></category>

		<category><![CDATA[JavaScript]]></category>

		<category><![CDATA[SQL]]></category>

		<category><![CDATA[dashCommerce 3.0.1]]></category>

		<guid isPermaLink="false">http://codehutch.com/?p=113</guid>
		<description><![CDATA[I have a web user control (.ascx) that holds my product DataList. This product DataList has an &#8216;add to cart&#8217; button in each item. When I hit one of the &#8216;add to cart&#8217; button, the &#8216;Invalid postback or callback argument&#8217; error shows up. Postback from other controls are fine.
&#60;asp:DataList ID=&#8221;dlCatalog&#8221; runat=&#8221;server&#8221; SkinId=&#8221;catalogList&#8221;&#62;
&#60;ItemTemplate&#62;
&#60;div class=&#8221;productBox&#8221;&#62;
&#60;div class=&#8221;productImageContainer&#8221;&#62;
&#60;asp:HyperLink ID=&#8221;hlImageLink&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>I have a web user control (.ascx) that holds my product DataList. This product DataList has an &#8216;add to cart&#8217; button in each item. When I hit one of the &#8216;add to cart&#8217; button, the &#8216;Invalid postback or callback argument&#8217; error shows up. Postback from other controls are fine.</p>
<blockquote><p>&lt;asp:DataList ID=&#8221;dlCatalog&#8221; runat=&#8221;server&#8221; SkinId=&#8221;catalogList&#8221;&gt;<br />
&lt;ItemTemplate&gt;<br />
&lt;div class=&#8221;productBox&#8221;&gt;<br />
&lt;div class=&#8221;productImageContainer&#8221;&gt;<br />
&lt;asp:HyperLink ID=&#8221;hlImageLink&#8221; runat=&#8221;server&#8221; NavigateUrl=&#8217;&lt;%# GetNavigateUrl(Eval(&#8221;ProductId&#8221;).ToString(), Eval(&#8221;Name&#8221;).ToString()) %&gt;&#8217; SkinID=&#8221;noDefaultImage&#8221; /&gt;<br />
&lt;/div&gt;<br />
&lt;asp:HyperLink ID=&#8221;hlProduct&#8221; runat=&#8221;server&#8221; NavigateUrl=&#8217;&lt;%# GetNavigateUrl(Eval(&#8221;ProductId&#8221;).ToString(), Eval(&#8221;Name&#8221;).ToString()) %&gt;&#8217; Text=&#8217;&lt;%# Eval(&#8221;Name&#8221;) %&gt;&#8217; CssClass=&#8221;catalogProductName&#8221; /&gt;<br />
&lt;br /&gt;<br />
&lt;asp:Label ID=&#8221;lblRetailPrice&#8221; runat=&#8221;server&#8221; CssClass=&#8221;retailPrice&#8221; /&gt;<br />
&lt;asp:Label ID=&#8221;lblOurPrice&#8221; runat=&#8221;server&#8221; CssClass=&#8221;ourPrice&#8221; /&gt;<br />
&lt;br /&gt;<br />
&lt;asp:LinkButton ID=&#8221;lbAddToCart&#8221; runat=&#8221;server&#8221; OnCommand=&#8221;lbAddToCart_Click&#8221; CommandArgument=&#8217;&lt;%# Eval(&#8221;ProductId&#8221;).ToString() + &#8220;;&#8221; + Eval(&#8221;Name&#8221;).ToString() %&gt;&#8217; CssClass=&#8221;button&#8221; Text=&#8221;Add To Cart&#8221; /&gt;<br />
&lt;/div&gt;<br />
&lt;/ItemTemplate&gt;<br />
&lt;/asp:DataList&gt;</p></blockquote>
<p>The following is the complete error message:<span id="more-113"></span></p>
<blockquote><p>Event validation is enabled using &lt;pages enableEventValidation=&#8221;true&#8221; /&gt; in configuration or &lt;%@ Page EnableEventValidation=&#8221;true&#8221; %&gt; in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.</p></blockquote>
<p>The solution is obvious, I should turn off the page directive setting: &lt;%@ Page EnableEventValidation=&#8221;false&#8221; %&gt;</p>
<p>Since I&#8217;m working with a web user control,  I go to its parent page and disable its event validation. And lo, it worked like a charm!</p>
<p>There are however important things to take note. As mentioned in the error message, the event validation makes sure that the postback and callback arguments came from where they are supposed to come from, disabling it causes security risks.</p>
<p>The following links give more information regarding this issue:</p>
<ul>
<li><a title="Script Exploits Overview" href="http://msdn.microsoft.com/en-us/library/w1sw53ds.aspx" target="_blank">Script Exploits Overview</a></li>
<li><a title="Invalid Postback and Callback Argument Error in ASP.Net" href="http://niravbhattsai.blogspot.com/2007/10/invalid-postback-or-callback-argument.html" target="_blank">Invalid Postback and Callback Argument Error in ASP.Net</a></li>
<li><a title="Invalid postback or callback argument (ASP.Net Forum Thread)" href="http://forums.asp.net/t/922994.aspx?PageIndex=1" target="_blank">Invalid postback or callback argument (ASP.Net Forum Thread)</a></li>
<li><a title="Error: EnableEventValidaiton=" href="http://forums.asp.net/t/973410.aspx?PageIndex=1" target="_blank">Error: EnableEventValidaiton=&#8221;true&#8221; (ASP.Net Forum Thread)</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://codehutch.com/2009/09/invalid-postback-or-callback-argument-error-in-datalist/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Tweet Via SMS FOR FREE!</title>
		<link>http://codehutch.com/2009/07/tweet-via-sms-for-free/</link>
		<comments>http://codehutch.com/2009/07/tweet-via-sms-for-free/#comments</comments>
		<pubDate>Mon, 20 Jul 2009 18:31:51 +0000</pubDate>
		<dc:creator>ikaruga</dc:creator>
		
		<category><![CDATA[Freebies]]></category>

		<category><![CDATA[Miscellaneous]]></category>

		<category><![CDATA[ISIP]]></category>

		<category><![CDATA[SMS]]></category>

		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://codehutch.com/?p=102</guid>
		<description><![CDATA[A sweet treat for Philippine resident Twitter addicts, an online application that allows users to tweet via SMS FOR FREE! The application is called, ISIP or &#8220;I Speak over Internet Protocol&#8221;.
ISIP enables Filipino subscribers of Twitter to post updates to their Twitter accounts via SMS FOR FREE! Get an account now! - isip.ph
]]></description>
			<content:encoded><![CDATA[<p>A sweet treat for Philippine resident Twitter addicts, an online application that allows users to tweet via SMS FOR FREE! The application is called, ISIP or &#8220;I Speak over Internet Protocol&#8221;.</p>
<blockquote><p><a href="http://www.isip.ph">ISIP</a> enables Filipino subscribers of Twitter to post updates to their Twitter accounts via SMS FOR FREE! Get an account now! - <em><a href="http://www.isip.ph">isip.ph</a></em></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://codehutch.com/2009/07/tweet-via-sms-for-free/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Twitpocalypse Is Coming</title>
		<link>http://codehutch.com/2009/06/twitpocalypse-is-coming/</link>
		<comments>http://codehutch.com/2009/06/twitpocalypse-is-coming/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 10:51:14 +0000</pubDate>
		<dc:creator>ikaruga</dc:creator>
		
		<category><![CDATA[Web News]]></category>

		<category><![CDATA[End Of Twitter]]></category>

		<category><![CDATA[Twitpocalypse]]></category>

		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://codehutch.com/?p=99</guid>
		<description><![CDATA[That&#8217;s right, the Twitpocalypse is almost here.
Before you rush out for canned food and medical supplies, let’s take a closer look at the Twitpocalypse.
The Twitpocalypse is predicted to be this monstrous event that will ravage Twitter and leave all Twitterers without a place for their 140 characters of text&#8230; and we are mere days from [...]]]></description>
			<content:encoded><![CDATA[<p>That&#8217;s right, the<strong> <a href="http://www.twitpocalypse.com/">Twitpocalypse</a> </strong>is almost here.</p>
<p>Before you <strong>rush out for canned food and medical supplies</strong>, let’s take a closer look at the Twitpocalypse.</p>
<p>The Twitpocalypse is predicted to be this <strong><a href="http://www.twitpocalypse.com/">monstrous event</a> that will ravage Twitter</strong> and leave all Twitterers without a place for their 140 characters of text&#8230; and we are mere days from it happening.</p>
<p><span style="color: #ff0000;"><strong>Are you nervous about the Twitpocalypse?</strong></span><strong> <a href="http://www.webpronews.com/topnews/2009/06/11/the-twitpocalypse-is-nearly-upon-us#comments">Tell us</a>.</strong></p>
<p><strong>The Twitpocalypse will happen on June 14, 2009 @ 7:10:53 GMT</strong> (at the time of this writing).</p>
<p><a href="http://www.twitpocalypse.com/"><img src="http://images.ientrymail.com/webpronews/twitpoc.gif" alt="The Twitpocalypse is nearly upon us!" /></a></p>
<p>Below is an explanation of <em>how</em> and <em>why</em> the Twitpocalypse will go down&#8230;</p>
<p><em>The Twitpocalypse is similar to the Y2K bug. Very soon the unique identifier associated to each tweet will exceed 2,147,483,647</em></p>
<p><em>&#8220;For some of your favorite third-party Twitter services not designed to handle such a case, the sequence will suddenly turn into negative numbers. At this point, they are very likely to malfunction or crash.&#8221;</em></p>
<p>I&#8217;ll see if I can explain this a little further for you. Each Tweet has a unique number assigned to it, for identification purposes&#8230; and those numbers are about to cross the threshold where they can be given a 32-bit integer, which only go from -2,147,483,648 to 2,147,483,648. <strong>So this means that about two billion Tweets have been sent!</strong></p>
<p>What&#8217;s ironic about this whole thing is <a href="http://search.twitter.com/search?q=twitpocalypse">people are Twittering about the Twitpocalypse</a>, and by doing so, <strong>they&#8217;re adding to the problem that is the core of the Twitpocalypse</strong>. Talk about <a href="http://search.twitter.com/search?q=twitpocalypse">irony</a>.</p>
<p><a href="http://twitter.com/EckyPro/statuses/2116273375"><img src="http://images.ientrymail.com/webpronews/tweet-contribute.gif" alt="Tweet contributing to the Twitpocalypse" /></a></p>
<p>Recently, I talked with the lead developer of <a href="http://www.twellow.com/"><strong>Twellow</strong></a>, Matthew Daines, and asked him about the Twitpocalypse&#8230;</p>
<p><em>&#8220;I haven&#8217;t researched it too much, but I doubt this will be a major issue. Sure, some apps might have some funny hiccups, faulty tweet references, or other problems, <strong>but any app that&#8217;s being used will address the issue, and it will be forgotten, in my opinion</strong>&#8220;.</em></p>
<p>See folks, the Twitpocalypse is something to keep an eye on&#8230; <strong>but nothing to induce a panic</strong>. Oh, and don&#8217;t you think if something was wrong with Twitter they would&#8217;ve mentioned something about it by now?</p>
<p>Look at Y2K, a much bigger deal, and it turned out to be a non-event&#8230; but just in case, <strong>anyone know if you can get Wi-Fi in a bomb shelter?</strong></p>
<p><em> By <a title="View user profile." href="http://www.webpronews.com/users/jeremy-muncy">Jeremy Muncy</a></em><br />
Source: <a href="http://www.webpronews.com/topnews/2009/06/11/the-twitpocalypse-is-nearly-upon-us">WebProNews</a><br />
Check out <a href="http://www.twitpocalypse.com/">twitpocalypse status</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://codehutch.com/2009/06/twitpocalypse-is-coming/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Solution to &#8220;Server Application Unavailable&#8221; Error</title>
		<link>http://codehutch.com/2009/05/solution-to-server-application-unavailable-error/</link>
		<comments>http://codehutch.com/2009/05/solution-to-server-application-unavailable-error/#comments</comments>
		<pubDate>Mon, 18 May 2009 14:47:49 +0000</pubDate>
		<dc:creator>ikaruga</dc:creator>
		
		<category><![CDATA[ASP.NET]]></category>

		<category><![CDATA[application pool]]></category>

		<category><![CDATA[sever application unavailable]]></category>

		<category><![CDATA[solution to server application unavailable]]></category>

		<category><![CDATA[solution to server application unavailable error]]></category>

		<guid isPermaLink="false">http://codehutch.com/?p=95</guid>
		<description><![CDATA[I encountered this error while running an old project, based from ASP.NET 1.1 Commerce Starter Kit and dashCommerce, previously called ASP.NET 2.0 Paypal eCommerce Starter Kit. It was recommended in dashCommerce installation to create a separate application pool solely for the dashCommerce project&#8217;s virtual directory. All was running smoothly until I installed it more than [...]]]></description>
			<content:encoded><![CDATA[<p>I encountered this error while running an old project, based from <a title="Commerce Web Site" href="http://www.asp.net/downloads/archived/starter-kits/commerce/">ASP.NET 1.1 Commerce Starter Kit</a> and <a title="An ASP.NET Open Source e-Commerce Application" href="http://www.dashcommerce.com" target="_self">dashCommerce</a>, previously called <a title="PayPal eCommerce Starter Kit" href="http://www.asp.net/downloads/starter-kits/paypal-ecommerce/" target="_self">ASP.NET 2.0 Paypal eCommerce Starter Kit</a>. It was recommended in dashCommerce installation to create a separate <a title="What is an Application Pool?" href="http://www.developer.com/net/asp/article.php/2245511" target="_self">application pool</a> solely for the dashCommerce project&#8217;s virtual directory. All was running smoothly until I installed it more than a couple times and missed this step along the way and thus it gave me &#8220;Server Application Unavailable&#8221; error.</p>
<p>This error might also mean something else, I&#8217;m only referring to the following.</p>
<blockquote><p><strong>The Problem:</strong><br />
Running at least two applications in different ASP.NET Frameworks (1.1 and 2.0/3.0) side by side could mean that somewhere you are trying to run 1.1 applications and 2.0/3.0 applications within the same process.</p>
<p><strong>The Solution:</strong><br />
Create different application pools in IIS for each ASP.NET Framework, one for 1.1 applications and the other for 2.0 applications.</p></blockquote>
<p>Solution Source: <a title="ASP.Net Forums" href="http://forums.asp.net/t/1003070.aspx" target="_self">ASP.Net Forums<br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://codehutch.com/2009/05/solution-to-server-application-unavailable-error/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Image Opacity Using CSS</title>
		<link>http://codehutch.com/2009/05/image-opacity-using-css/</link>
		<comments>http://codehutch.com/2009/05/image-opacity-using-css/#comments</comments>
		<pubDate>Thu, 14 May 2009 08:01:49 +0000</pubDate>
		<dc:creator>matt</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://codehutch.com/?p=66</guid>
		<description><![CDATA[Here is an illustration on how to use CSS to modify the opacity of &#8216;image-links&#8217; and create a nice effect
CSS:
img{
border:none;
}
updated version
.link img{
-ms-filter: &#8220;alpha(opacity=50)&#8221;; /*IE 8*/
filter: alpha(opacity=50); /*lower IE versions*/
opacity: 0.5; /*FF*/
}
.link:hover img{
-ms-filter: &#8220;alpha(opacity=100)&#8221;; /*IE 8*/
filter: alpha(opacity=100); /*lower IE versions*/
opacity: 1; /*FF*/
}
deprecated
.link img{
filter:progid:DXImageTransform.Microsoft.Alpha(opacity=50);
-moz-opacity: 0.5;
}
.link:hover img{
filter:progid:DXImageTransform.Microsoft.Alpha(opacity=100);
-moz-opacity: 1;
}
How to use:
&#60;a href=&#8221;#&#8221; class=&#8221;link&#8221; &#62;&#60;img src=&#8221;superman.jpg&#8221;/&#62;&#60;/a&#62;
Sample:

Thanks for the input j.j.  [...]]]></description>
			<content:encoded><![CDATA[<p>Here is an illustration on how to use CSS to modify the opacity of &#8216;image-links&#8217; and create a nice effect</p>
<p>CSS:</p>
<blockquote><p>img{<br />
border:none;<br />
}</p>
<p><strong>updated version</strong></p>
<p>.link img{<br />
-ms-filter: &#8220;alpha(opacity=50)&#8221;; /*IE 8*/<br />
filter: alpha(opacity=50); /*lower IE versions*/<br />
opacity: 0.5; /*FF*/<br />
}</p>
<p>.link:hover img{<br />
-ms-filter: &#8220;alpha(opacity=100)&#8221;; /*IE 8*/<br />
filter: alpha(opacity=100); /*lower IE versions*/<br />
opacity: 1; /*FF*/<br />
}</p>
<p><strong>deprecated</strong></p>
<p><span style="text-decoration: line-through;">.link img{<br />
filter:progid:DXImageTransform.Microsoft.Alpha(opacity=50);<br />
-moz-opacity: 0.5;<br />
}</span></p>
<p><span style="text-decoration: line-through;">.link:hover img{<br />
filter:progid:DXImageTransform.Microsoft.Alpha(opacity=100);<br />
-moz-opacity: 1;<br />
}</span></p></blockquote>
<p>How to use:</p>
<blockquote><p>&lt;a href=&#8221;#&#8221; class=&#8221;link&#8221; &gt;&lt;img src=&#8221;superman.jpg&#8221;/&gt;&lt;/a&gt;</p></blockquote>
<p>Sample:<br />
<a class="link" href="#"><img src="http://codehutch.com/superman.jpg" alt="" /></a></p>
<p>Thanks for the input j.j.  <img src='http://codehutch.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://codehutch.com/2009/05/image-opacity-using-css/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Visual Studio &#8216;MachineToApplication&#8217; Error</title>
		<link>http://codehutch.com/2009/05/visual-studio-machinetoapplication-error/</link>
		<comments>http://codehutch.com/2009/05/visual-studio-machinetoapplication-error/#comments</comments>
		<pubDate>Thu, 14 May 2009 07:21:35 +0000</pubDate>
		<dc:creator>matt</dc:creator>
		
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://codehutch.com/?p=63</guid>
		<description><![CDATA[I was trying to deploy my Project using Visual Studio 2008 a while ago, when I encountered this Error:
&#8220;It is an error to use a section registered as allowDefinition=&#8217;MachineToApplication&#8217; beyond application level This error can be caused by a virtual directory not being configured as an application in IIS.&#8221;
And I had no idea why it [...]]]></description>
			<content:encoded><![CDATA[<p>I was trying to deploy my Project using Visual Studio 2008 a while ago, when I encountered this Error:</p>
<blockquote><p>&#8220;It is an error to use a section registered as allowDefinition=&#8217;MachineToApplication&#8217; beyond application level This error can be caused by a virtual directory not being configured as an application in IIS.&#8221;</p></blockquote>
<p>And I had no idea why it was happening. I was not even trying to access my project in a browser (I was just trying to deploy!). I wasted almost an hour trying to figure it out before I luckily stumbled to<a href="http://blogs.msdn.com/robgruen/archive/2005/09/12/464196.aspx" target="_blank"> Rob Gruen</a>&#8217;s blog. Though his case was different (I did not upgrade), I hurriedly followed his suggestion. I search for web.config file in my project&#8217;s folder and to my surprise, there were two of them. Suddenly, I remember that I was testing something and added a test-website inside my project which contains a web.config file. I just deleted the whole test-website and, boom! the deployment went smoothly. So, if you encounter this error, just remember that you cannot use multiple web.config in one application.</p>
]]></content:encoded>
			<wfw:commentRss>http://codehutch.com/2009/05/visual-studio-machinetoapplication-error/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Export DataTable To Excel (VB .NET)</title>
		<link>http://codehutch.com/2009/05/export-datatable-to-excel-vb-net/</link>
		<comments>http://codehutch.com/2009/05/export-datatable-to-excel-vb-net/#comments</comments>
		<pubDate>Wed, 13 May 2009 10:16:38 +0000</pubDate>
		<dc:creator>matt</dc:creator>
		
		<category><![CDATA[VB .Net]]></category>

		<guid isPermaLink="false">http://codehutch.com/?p=52</guid>
		<description><![CDATA[I was digging through my files when I found this subroutine and I thought, maybe somebody out there might need it. It&#8217;s not my original code though (and I forgot where I got it). Anyhow, I just wanted to share it and here it is:
Public Sub ExportToExcel()
Dim table as Datatable = &#8220;Query your datatable here&#8221;
Dim [...]]]></description>
			<content:encoded><![CDATA[<p>I was digging through my files when I found this subroutine and I thought, maybe somebody out there might need it. It&#8217;s not my original code though (and I forgot where I got it). Anyhow, I just wanted to share it and here it is:</p>
<blockquote><p>Public Sub ExportToExcel()</p>
<p>Dim table as Datatable = &#8220;Query your datatable here&#8221;<br />
Dim name as String  = &#8220;filename&#8221;</p>
<p>Dim context As HttpContext = HttpContext.Current<br />
context.Response.Clear()<br />
For Each column As DataColumn In table.Columns<br />
context.Response.Write(column.ColumnName &amp; &#8220;,&#8221;)<br />
Next<br />
context.Response.Write(Environment.NewLine)<br />
For Each row As DataRow In table.Rows<br />
For i As Integer = 0 To table.Columns.Count - 1<br />
context.Response.Write(row(i).ToString().Replace(&#8221;,&#8221;, String.Empty) &amp; &#8220;,&#8221;)<br />
Next<br />
context.Response.Write(Environment.NewLine)<br />
Next<br />
context.Response.ContentType = &#8220;text/csv&#8221;<br />
context.Response.AppendHeader(&#8221;Content-Disposition&#8221;, &#8220;attachment; filename=&#8221; &amp; name &amp; &#8220;.csv&#8221;)<br />
context.Response.[End]()</p>
<p>LoadData_Base()<br />
End Sub</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://codehutch.com/2009/05/export-datatable-to-excel-vb-net/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
