<?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>I&#039;m CaLendarW Blog &#187; error handling</title>
	<atom:link href="http://wongkalun.idv.hk/category/computer-science/error-handling/feed/" rel="self" type="application/rss+xml" />
	<link>http://wongkalun.idv.hk</link>
	<description>Put the technology in correct places</description>
	<lastBuildDate>Sun, 18 Apr 2010 16:19:55 +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>Error 29506 when installing SQL Server 2005 Management Studio Express on Windows 7</title>
		<link>http://wongkalun.idv.hk/2009/08/25/error-29506-when-installing-sql-server-2005-management-studio-express-on-windows-7/</link>
		<comments>http://wongkalun.idv.hk/2009/08/25/error-29506-when-installing-sql-server-2005-management-studio-express-on-windows-7/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 15:26:21 +0000</pubDate>
		<dc:creator>calendarw</dc:creator>
				<category><![CDATA[error handling]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[windows7]]></category>

		<guid isPermaLink="false">http://wongkalun.idv.hk/?p=692</guid>
		<description><![CDATA[部 x60 今日好似傻傻地, 所以係部 tx2 度預備返個 development environment, 而用開 xp 既我, 換左 win7 之後連入野都好似有 d 問題&#8230;&#8230; 好在係網上搵到以下呢個 procedure: Click &#8220;All Programs&#8221;, select &#8220;Accessories&#8221;, right click the Command Prompt shortcut and select &#8220;Run as Administrator&#8221;. Click &#8220;Yes&#8221; to accept the warning Use command &#8220;cd&#8221; to navigate to the installation directory. Type the installation file to execute [...]]]></description>
			<content:encoded><![CDATA[<div>部 x60 今日好似傻傻地, 所以係部 tx2 度預備返個 development environment, 而用開 xp 既我, 換左 win7 之後連入野都好似有 d 問題&#8230;&#8230;</div>
<div></div>
<div>好在係網上搵到以下呢個 procedure:</div>
<ol>
<li>Click &#8220;All Programs&#8221;, select &#8220;Accessories&#8221;, right click the Command Prompt shortcut and select &#8220;Run as Administrator&#8221;.</li>
<li>Click &#8220;Yes&#8221; to accept the warning</li>
<li>Use command &#8220;cd&#8221; to navigate to the installation directory.</li>
<li>Type the installation file to execute file. (e.g. SQLServer2005_SSMSEE_x64.msi) and complete the installation.</li>
</ol>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-enjoy">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://wongkalun.idv.hk/2009/08/25/error-29506-when-installing-sql-server-2005-management-studio-express-on-windows-7/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://wongkalun.idv.hk/2009/08/25/error-29506-when-installing-sql-server-2005-management-studio-express-on-windows-7/&amp;title=Error+29506+when+installing+SQL+Server+2005+Management+Studio+Express+on+Windows+7" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://wongkalun.idv.hk/2009/08/25/error-29506-when-installing-sql-server-2005-management-studio-express-on-windows-7/&amp;title=Error+29506+when+installing+SQL+Server+2005+Management+Studio+Express+on+Windows+7" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://wongkalun.idv.hk/2009/08/25/error-29506-when-installing-sql-server-2005-management-studio-express-on-windows-7/&amp;title=Error+29506+when+installing+SQL+Server+2005+Management+Studio+Express+on+Windows+7&amp;desc=%E9%83%A8%20x60%20%E4%BB%8A%E6%97%A5%E5%A5%BD%E4%BC%BC%E5%82%BB%E5%82%BB%E5%9C%B0%2C%20%E6%89%80%E4%BB%A5%E4%BF%82%E9%83%A8%20tx2%20%E5%BA%A6%E9%A0%90%E5%82%99%E8%BF%94%E5%80%8B%20development%20environment%2C%20%E8%80%8C%E7%94%A8%E9%96%8B%20xp%20%E6%97%A2%E6%88%91%2C%20%E6%8F%9B%E5%B7%A6%20win7%20%E4%B9%8B%E5%BE%8C%E9%80%A3%E5%85%A5%E9%87%8E%E9%83%BD%E5%A5%BD%E4%BC%BC%E6%9C%89%20d%20%E5%95%8F%E9%A1%8C......%0D%0A%0D%0A%E5%A5%BD%E5%9C%A8%E4%BF%82%E7%B6%B2%E4%B8%8A%E6%90%B5%E5%88%B0%E4%BB%A5%E4%B8%8B%E5%91%A2%E5%80%8B%20procedure%3A%0D%0A%0D%0A%09Click%20%22All%20Programs%22%2C%20select%20%22Accessories%22%2C%20right%20click%20the%20Command%20Prompt%20shortcut" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://wongkalun.idv.hk/2009/08/25/error-29506-when-installing-sql-server-2005-management-studio-express-on-windows-7/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.mister-wong.com/addurl/?bm_url=http://wongkalun.idv.hk/2009/08/25/error-29506-when-installing-sql-server-2005-management-studio-express-on-windows-7/&amp;bm_description=Error+29506+when+installing+SQL+Server+2005+Management+Studio+Express+on+Windows+7&amp;plugin=sexybookmarks" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.mixx.com/submit?page_url=http://wongkalun.idv.hk/2009/08/25/error-29506-when-installing-sql-server-2005-management-studio-express-on-windows-7/&amp;title=Error+29506+when+installing+SQL+Server+2005+Management+Studio+Express+on+Windows+7" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://wongkalun.idv.hk/2009/08/25/error-29506-when-installing-sql-server-2005-management-studio-express-on-windows-7/&amp;title=Error+29506+when+installing+SQL+Server+2005+Management+Studio+Express+on+Windows+7" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://wongkalun.idv.hk/2009/08/25/error-29506-when-installing-sql-server-2005-management-studio-express-on-windows-7/&amp;title=Error+29506+when+installing+SQL+Server+2005+Management+Studio+Express+on+Windows+7" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://wongkalun.idv.hk/2009/08/25/error-29506-when-installing-sql-server-2005-management-studio-express-on-windows-7/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Error+29506+when+installing+SQL+Server+2005+Management+Studio+Express+on+Windows%5B..%5D+-+http://bit.ly/9tQXwb&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>




		<!-- Added by WP-DragToShare-eXtended Plugin -->
		<script type="text/javascript">
			dtsv.dtse_post_692_permalink = 'http://wongkalun.idv.hk/2009/08/25/error-29506-when-installing-sql-server-2005-management-studio-express-on-windows-7/';
			dtsv.dtse_post_692_title = 'Error 29506 when installing SQL Server 2005 Management Studio Express on Windows 7';
		</script>
		<!-- End of WP-DragToShare-eXtended Plugin -->]]></content:encoded>
			<wfw:commentRss>http://wongkalun.idv.hk/2009/08/25/error-29506-when-installing-sql-server-2005-management-studio-express-on-windows-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MsSQL &#8211; Identity Generator</title>
		<link>http://wongkalun.idv.hk/2009/07/07/mssql-identity-generator/</link>
		<comments>http://wongkalun.idv.hk/2009/07/07/mssql-identity-generator/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 15:24:39 +0000</pubDate>
		<dc:creator>calendarw</dc:creator>
				<category><![CDATA[database]]></category>
		<category><![CDATA[error handling]]></category>
		<category><![CDATA[mssql]]></category>

		<guid isPermaLink="false">http://wongkalun.idv.hk/?p=629</guid>
		<description><![CDATA[MsSQL 內既 Identity Generator, 雖然被發現當 Table 儲存超過一百萬行時, 由 SELECT @@Identity 或者 SELECT SCOPE_IDENTITY() 會存在 Return 值錯誤既問題, 但經過呢個幾月既開發都未出現問題. 係 MsSQL 入面, 新增 Record 時主要提取 Primary Key 既方法主要有 @@IDENTITY, SCOPE_IDENTY() 同 IDENT_CURRENT(&#8216;table_name&#8217;) 三種: @@IDENTITY 使用 @@IDENTITY 會 Return 當前 Session 任何 Table 最後生產的 Primary Key, 如果 Insert statement 運行後如果有任何 Trigger 中會 Insert 在其他 Table 的話, @@IDENTITY 就會變得不準確. [...]]]></description>
			<content:encoded><![CDATA[<p>MsSQL 內既 Identity Generator, 雖然被發現當 Table 儲存超過一百萬行時, 由 SELECT @@Identity 或者 SELECT SCOPE_IDENTITY() 會存在 Return 值錯誤既問題, 但經過呢個幾月既開發都未出現問題.</p>
<p>係 MsSQL 入面, 新增 Record 時主要提取 Primary Key 既方法主要有 @@IDENTITY, SCOPE_IDENTY() 同 IDENT_CURRENT(&#8216;table_name&#8217;) 三種:</p>
<p><strong>@@IDENTITY</strong><br />
使用 @@IDENTITY 會 Return 當前 Session 任何 Table 最後生產的 Primary Key, 如果 Insert statement 運行後如果有任何 Trigger 中會 Insert 在其他 Table 的話, @@IDENTITY 就會變得不準確.</p>
<p><strong>SCOPE_IDENTY()</strong><br />
使用 SCOPE_IDENTY() 會 Return 當前 Scope 內確實 Insert 左既 Primary Key, 就算有任何 Trigger 在背後運行都不會有任何影響, 係一個最好既選擇.  不過經由 MS Connect 入面既 <a href="https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=328811">Feedback</a> 顯示, Table 被新增至一百萬行後, Return Value 有可以會籨 1 開始數起, 這問題由 MS 回應既答案中回答到已增加到它們的 Bug tracking database 中.</p>
<p><strong>IDENT_CURRENT(&#8216;table_name&#8217;)</strong><br />
而 IDENT_CURRENT(&#8216;table_name&#8217;) 會 Return 指定 Table 最後生產出來的 Identity, 由於它不會理會任何 Scope 或者 Session, 當有多於一個 Scope 或者 Session 運行時便有機會出現不準確既問題.</p>
<p>因此, 在以上三個尋找 IDENTITY 既方法中, 並沒有一個能在任何環境下百分百準確既方法, 所以在 MsSQL 使用 Identity Generator 便會有潛在問題既可能性, 因此在 deploy 前應該對 Database 作詳細測試, 已確定當前既環境設定正確.</p>
<p>再者, Identity Generator 亦開始慢慢地被其他類型既方案取代, 例如 <a href="http://en.wikipedia.org/wiki/Globally_Unique_Identifier">GUID</a>, Hi/Lo or UUID 等等.</p>
<p>正如之前 <a href="http://wongkalun.idv.hk/2009/06/15/software-engineering-does-not-equal-computer-science/">CS != SE</a> 文章內所講, Technology 其實永遠唔會有錯, 錯就只會錯在未能正確使用它們既人, 而軟件其中一個用途就係用來避免人們使用犯錯, 所以在程式篇寫時應該以不同既設定技巧及文檔來避免人們使用錯誤, 那軟件才容易正確地被使用!!</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-enjoy">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://wongkalun.idv.hk/2009/07/07/mssql-identity-generator/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://wongkalun.idv.hk/2009/07/07/mssql-identity-generator/&amp;title=MsSQL+-+Identity+Generator" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://wongkalun.idv.hk/2009/07/07/mssql-identity-generator/&amp;title=MsSQL+-+Identity+Generator" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://wongkalun.idv.hk/2009/07/07/mssql-identity-generator/&amp;title=MsSQL+-+Identity+Generator&amp;desc=MsSQL%20%E5%85%A7%E6%97%A2%20Identity%20Generator%2C%20%E9%9B%96%E7%84%B6%E8%A2%AB%E7%99%BC%E7%8F%BE%E7%95%B6%20Table%20%E5%84%B2%E5%AD%98%E8%B6%85%E9%81%8E%E4%B8%80%E7%99%BE%E8%90%AC%E8%A1%8C%E6%99%82%2C%20%E7%94%B1%20SELECT%20%40%40Identity%20%E6%88%96%E8%80%85%20SELECT%20SCOPE_IDENTITY%28%29%20%E6%9C%83%E5%AD%98%E5%9C%A8%20Return%20%E5%80%BC%E9%8C%AF%E8%AA%A4%E6%97%A2%E5%95%8F%E9%A1%8C%2C%20%E4%BD%86%E7%B6%93%E9%81%8E%E5%91%A2%E5%80%8B%E5%B9%BE%E6%9C%88%E6%97%A2%E9%96%8B%E7%99%BC%E9%83%BD%E6%9C%AA%E5%87%BA%E7%8F%BE%E5%95%8F%E9%A1%8C.%0D%0A%0D%0A%E4%BF%82%20MsSQL%20%E5%85%A5%E9%9D%A2%2C%20%E6%96%B0%E5%A2%9E%20Record%20%E6%99%82%E4%B8%BB%E8%A6%81%E6%8F%90%E5%8F%96%20Primary%20Key%20%E6%97%A2%E6%96%B9%E6%B3%95%E4" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://wongkalun.idv.hk/2009/07/07/mssql-identity-generator/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.mister-wong.com/addurl/?bm_url=http://wongkalun.idv.hk/2009/07/07/mssql-identity-generator/&amp;bm_description=MsSQL+-+Identity+Generator&amp;plugin=sexybookmarks" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.mixx.com/submit?page_url=http://wongkalun.idv.hk/2009/07/07/mssql-identity-generator/&amp;title=MsSQL+-+Identity+Generator" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://wongkalun.idv.hk/2009/07/07/mssql-identity-generator/&amp;title=MsSQL+-+Identity+Generator" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://wongkalun.idv.hk/2009/07/07/mssql-identity-generator/&amp;title=MsSQL+-+Identity+Generator" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://wongkalun.idv.hk/2009/07/07/mssql-identity-generator/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=MsSQL+-+Identity+Generator+-+http://bit.ly/bfdfwd&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>




		<!-- Added by WP-DragToShare-eXtended Plugin -->
		<script type="text/javascript">
			dtsv.dtse_post_629_permalink = 'http://wongkalun.idv.hk/2009/07/07/mssql-identity-generator/';
			dtsv.dtse_post_629_title = 'MsSQL – Identity Generator';
		</script>
		<!-- End of WP-DragToShare-eXtended Plugin -->]]></content:encoded>
			<wfw:commentRss>http://wongkalun.idv.hk/2009/07/07/mssql-identity-generator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Avoid identity generator when possible</title>
		<link>http://wongkalun.idv.hk/2009/04/15/avoid-identity-generator-when-possible/</link>
		<comments>http://wongkalun.idv.hk/2009/04/15/avoid-identity-generator-when-possible/#comments</comments>
		<pubDate>Wed, 15 Apr 2009 15:50:11 +0000</pubDate>
		<dc:creator>calendarw</dc:creator>
				<category><![CDATA[diary]]></category>
		<category><![CDATA[error handling]]></category>
		<category><![CDATA[mssql]]></category>

		<guid isPermaLink="false">http://wongkalun.idv.hk/?p=440</guid>
		<description><![CDATA[係 Ayende 個 Blog 度見到呢個 post, 入面講述應該避免使用 identity. 由 Dave 於上年二月回報 M$ 既一個 feedback 中提及, 只要新增多個一百萬行數據, 個 identity 就會被 reset 做 1. 雖然我未測試過係咪真係有呢個情況, 但該文章中已經有五個人証明左問題既存在, 而我計算過, 如果在同一個 table 入面, 一日新增五百行數據的話, 只要五年多既時間便會去到一百萬行. 五年, 雖然我以前跟開既項目都有三年一次既資料清理, 但亦有機會有每日多於五百行或者五年不清理既情況發生. 以我在網上既搜尋下, 而家外國都開始使用 Guid, 除了同 database 有關既連結外, 我見過 M$ 既 WF Example 入面已經全部使用了 Guid, 我諗有時間既情況下都要了解一下 Guid 既好處同壞處. Subscribe to the comments for this [...]]]></description>
			<content:encoded><![CDATA[<p>係 Ayende 個 Blog 度見到呢個 <a href="http://ayende.com/Blog/archive/2009/03/20/nhibernate-avoid-identity-generator-when-possible.aspx">post</a>, 入面講述應該避免使用 identity.<br />
<span id="more-440"></span><br />
由 Dave 於上年二月回報 M$ 既一個 <a href="https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=328811">feedback</a> 中提及, 只要新增多個一百萬行數據, 個 identity 就會被 reset 做 1.</p>
<p>雖然我未測試過係咪真係有呢個情況, 但該文章中已經有<strong>五個人</strong>証明左問題既存在, 而我計算過, 如果在同一個 table 入面, 一日新增五百行數據的話, 只要五年多既時間便會去到一百萬行.  五年, 雖然我以前跟開既項目都有三年一次既資料清理, 但亦有機會有每日多於五百行或者五年不清理既情況發生.</p>
<p>以我在網上既搜尋下, 而家外國都開始使用 <a href="http://en.wikipedia.org/wiki/Globally_Unique_Identifier">Guid</a>, 除了同 database 有關既連結外, 我見過 M$ 既 <a href="http://msdn.microsoft.com/en-us/library/ms741723.aspx">WF Example</a> 入面已經全部使用了 <a href="http://msdn.microsoft.com/en-us/library/system.guid.aspx">Guid</a>, 我諗有時間既情況下都要了解一下 Guid 既好處同壞處.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-enjoy">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://wongkalun.idv.hk/2009/04/15/avoid-identity-generator-when-possible/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://wongkalun.idv.hk/2009/04/15/avoid-identity-generator-when-possible/&amp;title=Avoid+identity+generator+when+possible" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://wongkalun.idv.hk/2009/04/15/avoid-identity-generator-when-possible/&amp;title=Avoid+identity+generator+when+possible" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://wongkalun.idv.hk/2009/04/15/avoid-identity-generator-when-possible/&amp;title=Avoid+identity+generator+when+possible&amp;desc=%E4%BF%82%20Ayende%20%E5%80%8B%20Blog%20%E5%BA%A6%E8%A6%8B%E5%88%B0%E5%91%A2%E5%80%8B%20post%2C%20%E5%85%A5%E9%9D%A2%E8%AC%9B%E8%BF%B0%E6%87%89%E8%A9%B2%E9%81%BF%E5%85%8D%E4%BD%BF%E7%94%A8%20identity.%0D%0A%0D%0A%E7%94%B1%20Dave%20%E6%96%BC%E4%B8%8A%E5%B9%B4%E4%BA%8C%E6%9C%88%E5%9B%9E%E5%A0%B1%20M%24%20%E6%97%A2%E4%B8%80%E5%80%8B%20feedback%20%E4%B8%AD%E6%8F%90%E5%8F%8A%2C%20%E5%8F%AA%E8%A6%81%E6%96%B0%E5%A2%9E%E5%A4%9A%E5%80%8B%E4%B8%80%E7%99%BE%E8%90%AC%E8%A1%8C%E6%95%B8%E6%93%9A%2C%20%E5%80%8B%20identity%20%E5%B0%B1%E6%9C%83%E8%A2%AB%20reset%20%E5%81%9A%201.%0D%0A%0D%0A%E9%9B%96%E7%84%B6%E6%88%91%E6%9C%AA%E6%B8%AC%E8%A9%A6%E9%81%8E%E4%BF%82%E5%92%AA%E7%9C%9F%E4%BF%82%E6%9C%89%E5%91%A2%E5%80%8B%E6%83%85%E6%B3%81%2C%20%E4%BD%86%E8%A9%B2%E6%96%87%E7%AB%A0%E4%B8%AD%E5%B7%B2%E7%B6%93%E6%9C" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://wongkalun.idv.hk/2009/04/15/avoid-identity-generator-when-possible/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.mister-wong.com/addurl/?bm_url=http://wongkalun.idv.hk/2009/04/15/avoid-identity-generator-when-possible/&amp;bm_description=Avoid+identity+generator+when+possible&amp;plugin=sexybookmarks" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.mixx.com/submit?page_url=http://wongkalun.idv.hk/2009/04/15/avoid-identity-generator-when-possible/&amp;title=Avoid+identity+generator+when+possible" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://wongkalun.idv.hk/2009/04/15/avoid-identity-generator-when-possible/&amp;title=Avoid+identity+generator+when+possible" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://wongkalun.idv.hk/2009/04/15/avoid-identity-generator-when-possible/&amp;title=Avoid+identity+generator+when+possible" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://wongkalun.idv.hk/2009/04/15/avoid-identity-generator-when-possible/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Avoid+identity+generator+when+possible+-+http://bit.ly/aNH6NX&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>




		<!-- Added by WP-DragToShare-eXtended Plugin -->
		<script type="text/javascript">
			dtsv.dtse_post_440_permalink = 'http://wongkalun.idv.hk/2009/04/15/avoid-identity-generator-when-possible/';
			dtsv.dtse_post_440_title = 'Avoid identity generator when possible';
		</script>
		<!-- End of WP-DragToShare-eXtended Plugin -->]]></content:encoded>
			<wfw:commentRss>http://wongkalun.idv.hk/2009/04/15/avoid-identity-generator-when-possible/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PROPFIND of &#8216;/svn&#8217;: 301 Moved Permanently</title>
		<link>http://wongkalun.idv.hk/2008/11/19/propfind-of-301-moved-permanently/</link>
		<comments>http://wongkalun.idv.hk/2008/11/19/propfind-of-301-moved-permanently/#comments</comments>
		<pubDate>Wed, 19 Nov 2008 02:30:37 +0000</pubDate>
		<dc:creator>calendarw</dc:creator>
				<category><![CDATA[error handling]]></category>
		<category><![CDATA[setup]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://wongkalun.idv.hk/?p=309</guid>
		<description><![CDATA[前排裝左個 subversion, 係 web 睇係無問題, 所以預備好之前都無乜理佢. 尋日想用果時, 用 TortoiseSVN checkout 就發現出左以下問題 PROPFIND of &#8216;/svn&#8217;: 301 Moved Permanently 結果發現, comment 左 DocumentRoot 之後就無問題啦~~ Subscribe to the comments for this post? Share this on del.icio.us Digg this! Post this on Diigo Post on Google Buzz Add this to Mister Wong Share this on Mixx Share this on [...]]]></description>
			<content:encoded><![CDATA[<p>前排裝左個 subversion, 係 web 睇係無問題, 所以預備好之前都無乜理佢.  尋日想用果時, 用 TortoiseSVN checkout 就發現出左以下問題</p>
<blockquote><p>
PROPFIND of &#8216;/svn&#8217;: 301 Moved Permanently
</p></blockquote>
<p>結果發現, comment 左 DocumentRoot 之後就無問題啦~~</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-enjoy">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://wongkalun.idv.hk/2008/11/19/propfind-of-301-moved-permanently/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://wongkalun.idv.hk/2008/11/19/propfind-of-301-moved-permanently/&amp;title=PROPFIND+of+%27%2Fsvn%27%3A+301+Moved+Permanently" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://wongkalun.idv.hk/2008/11/19/propfind-of-301-moved-permanently/&amp;title=PROPFIND+of+%27%2Fsvn%27%3A+301+Moved+Permanently" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://wongkalun.idv.hk/2008/11/19/propfind-of-301-moved-permanently/&amp;title=PROPFIND+of+%27%2Fsvn%27%3A+301+Moved+Permanently&amp;desc=%E5%89%8D%E6%8E%92%E8%A3%9D%E5%B7%A6%E5%80%8B%20subversion%2C%20%E4%BF%82%20web%20%E7%9D%87%E4%BF%82%E7%84%A1%E5%95%8F%E9%A1%8C%2C%20%E6%89%80%E4%BB%A5%E9%A0%90%E5%82%99%E5%A5%BD%E4%B9%8B%E5%89%8D%E9%83%BD%E7%84%A1%E4%B9%9C%E7%90%86%E4%BD%A2.%20%20%E5%B0%8B%E6%97%A5%E6%83%B3%E7%94%A8%E6%9E%9C%E6%99%82%2C%20%E7%94%A8%20TortoiseSVN%20checkout%20%E5%B0%B1%E7%99%BC%E7%8F%BE%E5%87%BA%E5%B7%A6%E4%BB%A5%E4%B8%8B%E5%95%8F%E9%A1%8C%0D%0A%0D%0APROPFIND%20of%20%27%2Fsvn%27%3A%20301%20Moved%20Permanently%0D%0A%0D%0A%E7%B5%90%E6%9E%9C%E7%99%BC%E7%8F%BE%2C%20comment%20%E5%B7%A6%20DocumentRoot%20%E4%B9%8B%E5%BE%8C%E5%B0%B1%E7%84%A1%E5%95%8F%E9%A1%8C%E5%95%A6%7E%7E%0D%0A" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://wongkalun.idv.hk/2008/11/19/propfind-of-301-moved-permanently/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.mister-wong.com/addurl/?bm_url=http://wongkalun.idv.hk/2008/11/19/propfind-of-301-moved-permanently/&amp;bm_description=PROPFIND+of+%27%2Fsvn%27%3A+301+Moved+Permanently&amp;plugin=sexybookmarks" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.mixx.com/submit?page_url=http://wongkalun.idv.hk/2008/11/19/propfind-of-301-moved-permanently/&amp;title=PROPFIND+of+%27%2Fsvn%27%3A+301+Moved+Permanently" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://wongkalun.idv.hk/2008/11/19/propfind-of-301-moved-permanently/&amp;title=PROPFIND+of+%27%2Fsvn%27%3A+301+Moved+Permanently" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://wongkalun.idv.hk/2008/11/19/propfind-of-301-moved-permanently/&amp;title=PROPFIND+of+%27%2Fsvn%27%3A+301+Moved+Permanently" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://wongkalun.idv.hk/2008/11/19/propfind-of-301-moved-permanently/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=PROPFIND+of+%27%2Fsvn%27%3A+301+Moved+Permanently+-+http://bit.ly/avEhS0&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>




		<!-- Added by WP-DragToShare-eXtended Plugin -->
		<script type="text/javascript">
			dtsv.dtse_post_309_permalink = 'http://wongkalun.idv.hk/2008/11/19/propfind-of-301-moved-permanently/';
			dtsv.dtse_post_309_title = 'PROPFIND of ‘/svn’: 301 Moved Permanently';
		</script>
		<!-- End of WP-DragToShare-eXtended Plugin -->]]></content:encoded>
			<wfw:commentRss>http://wongkalun.idv.hk/2008/11/19/propfind-of-301-moved-permanently/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding ListItems don&#8217;t work with CheckboxList,RadiobuttonList etc.</title>
		<link>http://wongkalun.idv.hk/2007/10/09/adding-listitems-dont-work-with-checkboxlistradiobuttonlist-etc/</link>
		<comments>http://wongkalun.idv.hk/2007/10/09/adding-listitems-dont-work-with-checkboxlistradiobuttonlist-etc/#comments</comments>
		<pubDate>Tue, 09 Oct 2007 08:19:18 +0000</pubDate>
		<dc:creator>calendarw</dc:creator>
				<category><![CDATA[error handling]]></category>
		<category><![CDATA[asp.net]]></category>

		<guid isPermaLink="false">http://wongkalun.idv.hk/?p=14</guid>
		<description><![CDATA[This is a bug of asp.net in 1.0 and 1.1, you may need to use HtmlInputRadioButton instead of RadioButtonList or HtmlSelect instead of DropDownList Microsoft Article: 309338 Subscribe to the comments for this post? Share this on del.icio.us Digg this! Post this on Diigo Post on Google Buzz Add this to Mister Wong Share this [...]]]></description>
			<content:encoded><![CDATA[<p>This is a bug of asp.net in 1.0 and 1.1, you may need to use <strong>HtmlInputRadioButton</strong> instead of <strong>RadioButtonList</strong> or <strong>HtmlSelect</strong> instead of <strong>DropDownList</strong></p>
<p>Microsoft Article: <a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;Q309338" title="The Attributes property of a ListItem control only works within an HtmlSelect control" target="_blank">309338</a></p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-enjoy">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://wongkalun.idv.hk/2007/10/09/adding-listitems-dont-work-with-checkboxlistradiobuttonlist-etc/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://wongkalun.idv.hk/2007/10/09/adding-listitems-dont-work-with-checkboxlistradiobuttonlist-etc/&amp;title=Adding+ListItems+don%27t+work+with+CheckboxList%2CRadiobuttonList+etc." rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://wongkalun.idv.hk/2007/10/09/adding-listitems-dont-work-with-checkboxlistradiobuttonlist-etc/&amp;title=Adding+ListItems+don%27t+work+with+CheckboxList%2CRadiobuttonList+etc." rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://wongkalun.idv.hk/2007/10/09/adding-listitems-dont-work-with-checkboxlistradiobuttonlist-etc/&amp;title=Adding+ListItems+don%27t+work+with+CheckboxList%2CRadiobuttonList+etc.&amp;desc=This%20is%20a%20bug%20of%20asp.net%20in%201.0%20and%201.1%2C%20you%20may%20need%20to%20use%20HtmlInputRadioButton%20instead%20of%20RadioButtonList%20or%20HtmlSelect%20instead%20of%20DropDownList%0D%0A%0D%0AMicrosoft%20Article%3A%20309338" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://wongkalun.idv.hk/2007/10/09/adding-listitems-dont-work-with-checkboxlistradiobuttonlist-etc/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.mister-wong.com/addurl/?bm_url=http://wongkalun.idv.hk/2007/10/09/adding-listitems-dont-work-with-checkboxlistradiobuttonlist-etc/&amp;bm_description=Adding+ListItems+don%27t+work+with+CheckboxList%2CRadiobuttonList+etc.&amp;plugin=sexybookmarks" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.mixx.com/submit?page_url=http://wongkalun.idv.hk/2007/10/09/adding-listitems-dont-work-with-checkboxlistradiobuttonlist-etc/&amp;title=Adding+ListItems+don%27t+work+with+CheckboxList%2CRadiobuttonList+etc." rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://wongkalun.idv.hk/2007/10/09/adding-listitems-dont-work-with-checkboxlistradiobuttonlist-etc/&amp;title=Adding+ListItems+don%27t+work+with+CheckboxList%2CRadiobuttonList+etc." rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://wongkalun.idv.hk/2007/10/09/adding-listitems-dont-work-with-checkboxlistradiobuttonlist-etc/&amp;title=Adding+ListItems+don%27t+work+with+CheckboxList%2CRadiobuttonList+etc." rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://wongkalun.idv.hk/2007/10/09/adding-listitems-dont-work-with-checkboxlistradiobuttonlist-etc/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Adding+ListItems+don%27t+work+with+CheckboxList%2CRadiobuttonList+etc.+-+http://bit.ly/b7yokO&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>




		<!-- Added by WP-DragToShare-eXtended Plugin -->
		<script type="text/javascript">
			dtsv.dtse_post_14_permalink = 'http://wongkalun.idv.hk/2007/10/09/adding-listitems-dont-work-with-checkboxlistradiobuttonlist-etc/';
			dtsv.dtse_post_14_title = 'Adding ListItems don’t work with CheckboxList,RadiobuttonList etc.';
		</script>
		<!-- End of WP-DragToShare-eXtended Plugin -->]]></content:encoded>
			<wfw:commentRss>http://wongkalun.idv.hk/2007/10/09/adding-listitems-dont-work-with-checkboxlistradiobuttonlist-etc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wp_post2cat does not exist when upgrade to wordpress 2.3</title>
		<link>http://wongkalun.idv.hk/2007/10/07/wp_post2cat-does-not-exist-when-upgrade-to-wordpress-23/</link>
		<comments>http://wongkalun.idv.hk/2007/10/07/wp_post2cat-does-not-exist-when-upgrade-to-wordpress-23/#comments</comments>
		<pubDate>Sun, 07 Oct 2007 01:35:28 +0000</pubDate>
		<dc:creator>calendarw</dc:creator>
				<category><![CDATA[admin]]></category>
		<category><![CDATA[error handling]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://wongkalun.idv.hk/?p=13</guid>
		<description><![CDATA[According the plug-in/theme compatibility of wordpress 2.3, when some of plug-ins or themes are not compatible, this error should be generated. It may required to upgrade or disable to use the incompatible  plug-in or theme, if create a table wp_post2cat, it can let the error disappear but it is not a correct action because no [...]]]></description>
			<content:encoded><![CDATA[<p>According the <a title="Plugin compatibility list" href="http://codex.wordpress.org/Plugins/Plugin_Compatibility/2.3">plug-in</a>/<a title="Theme compatibility list" href="http://codex.wordpress.org/Themes/Theme_Compatibility/2.3">theme</a> compatibility of wordpress 2.3, when some of plug-ins or themes are not compatible, this error should be generated.</p>
<p>It may required to upgrade or disable to use the incompatible  plug-in or theme, if create a table wp_post2cat, it can let the error disappear but it is not a correct action because no function should be provided by that table anymore.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-enjoy">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://wongkalun.idv.hk/2007/10/07/wp_post2cat-does-not-exist-when-upgrade-to-wordpress-23/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://wongkalun.idv.hk/2007/10/07/wp_post2cat-does-not-exist-when-upgrade-to-wordpress-23/&amp;title=wp_post2cat+does+not+exist+when+upgrade+to+wordpress+2.3" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://wongkalun.idv.hk/2007/10/07/wp_post2cat-does-not-exist-when-upgrade-to-wordpress-23/&amp;title=wp_post2cat+does+not+exist+when+upgrade+to+wordpress+2.3" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://wongkalun.idv.hk/2007/10/07/wp_post2cat-does-not-exist-when-upgrade-to-wordpress-23/&amp;title=wp_post2cat+does+not+exist+when+upgrade+to+wordpress+2.3&amp;desc=According%20the%20plug-in%2Ftheme%20compatibility%20of%20wordpress%202.3%2C%20when%20some%20of%20plug-ins%20or%20themes%20are%20not%20compatible%2C%20this%20error%20should%20be%20generated.%0D%0A%0D%0AIt%20may%20required%20to%20upgrade%20or%20disable%20to%20use%20the%20incompatible%C2%A0%20plug-in%20or%20theme%2C%20if%20create%20a%20table%20wp_post2cat%2C%20it%20can%20let%20the%20error%20disappear%20but%20it%20is" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://wongkalun.idv.hk/2007/10/07/wp_post2cat-does-not-exist-when-upgrade-to-wordpress-23/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.mister-wong.com/addurl/?bm_url=http://wongkalun.idv.hk/2007/10/07/wp_post2cat-does-not-exist-when-upgrade-to-wordpress-23/&amp;bm_description=wp_post2cat+does+not+exist+when+upgrade+to+wordpress+2.3&amp;plugin=sexybookmarks" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.mixx.com/submit?page_url=http://wongkalun.idv.hk/2007/10/07/wp_post2cat-does-not-exist-when-upgrade-to-wordpress-23/&amp;title=wp_post2cat+does+not+exist+when+upgrade+to+wordpress+2.3" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://wongkalun.idv.hk/2007/10/07/wp_post2cat-does-not-exist-when-upgrade-to-wordpress-23/&amp;title=wp_post2cat+does+not+exist+when+upgrade+to+wordpress+2.3" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://wongkalun.idv.hk/2007/10/07/wp_post2cat-does-not-exist-when-upgrade-to-wordpress-23/&amp;title=wp_post2cat+does+not+exist+when+upgrade+to+wordpress+2.3" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://wongkalun.idv.hk/2007/10/07/wp_post2cat-does-not-exist-when-upgrade-to-wordpress-23/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=wp_post2cat+does+not+exist+when+upgrade+to+wordpress+2.3+-+http://bit.ly/aSKsGM&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>




		<!-- Added by WP-DragToShare-eXtended Plugin -->
		<script type="text/javascript">
			dtsv.dtse_post_13_permalink = 'http://wongkalun.idv.hk/2007/10/07/wp_post2cat-does-not-exist-when-upgrade-to-wordpress-23/';
			dtsv.dtse_post_13_title = 'wp_post2cat does not exist when upgrade to wordpress 2.3';
		</script>
		<!-- End of WP-DragToShare-eXtended Plugin -->]]></content:encoded>
			<wfw:commentRss>http://wongkalun.idv.hk/2007/10/07/wp_post2cat-does-not-exist-when-upgrade-to-wordpress-23/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASP.NET Event Validation</title>
		<link>http://wongkalun.idv.hk/2007/08/20/aspnet-event-validation/</link>
		<comments>http://wongkalun.idv.hk/2007/08/20/aspnet-event-validation/#comments</comments>
		<pubDate>Mon, 20 Aug 2007 15:36:37 +0000</pubDate>
		<dc:creator>calendarw</dc:creator>
				<category><![CDATA[error handling]]></category>
		<category><![CDATA[asp.net]]></category>

		<guid isPermaLink="false">http://wongkalun.idv.hk/?p=6</guid>
		<description><![CDATA[[http://asp.net ASP.net] 2.0 添加了 event validation 的功能, 用來檢查張 form 的 variable, 如果張 form 係一開始時無將 possible variable encode 入個 session 度, 就會 throw exception: Invalid postback or callback argument. Event validation is enabled using &#60;pages enableEventValidation=&#8221;true&#8221;/&#62; in configuration or &#60;%@ Page EnableEventValidation=&#8221;true&#8221; %&#62; in a page. For security purposes, this feature verifies that arguments to postback [...]]]></description>
			<content:encoded><![CDATA[<p>[http://asp.net ASP.net] 2.0 添加了 event validation 的功能, 用來檢查張 form 的 variable, 如果張 form 係一開始時無將 possible variable encode 入個 session 度, 就會 throw exception:</p>
<blockquote><p>Invalid postback or callback argument.  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><span id="more-6"></span><br />
呢個係防止 [http://weblogs.asp.net/bleroy/archive/2004/08/18/216861.aspx injection attack] 既設計, 但是同時有部份 client script 也會出錯, 例如在 asp.net render DropDownList 時,會record 晒所有有可能既 value, 儲係個 page 度</p>
<p>這個過程發生在control的Render()方法中<br />
當頁面postback時,ASP.NET會根據這個隱藏值檢查postback values,如果找不到對應信息,就會throw exception. 所以所有有關 client script 改動 list control 既動作就會有影響</p>
<p>解決方法<br />
1. 禁止這個功能, 但同時會失去一些安全保障:<br />
//—-通過web.config</p>
<pre lang="xml"></pre>
<p>//—-針對某個page</p>
<pre lang="xml">&lt;%@ Page EnableEventValidation="false" … %&gt;</pre>
<p>2.Register For Event Validation<br />
其原理就是讓asp.net記錄這個postback value.<br />
RegisterForEventValidation必須在render() 內使用.</p>
<pre lang="csharp">protected override void Render(HtmlTextWriter writer)
{
	ClientScript.RegisterForEventValidation(_recipeList.UniqueID,"4");
	// 4 係其中一個 possible value
	base.Render(writer);
}</pre>
<p>如果我們自己寫了一個control,需要使用validate events功能,就需要使用SupportsEventValidation attribute,</p>
<pre lang="csharp">[SupportsEventValidation]
public class DynamicDropDownList : DropDownList
{
	protected override void Render(System.Web.UI.HtmlTextWriter writer)
	{
		Page.ClientScript.RegisterForEventValidation(this.UniqueID, "4");
		// 4 係其中一個 possible value, 如果多過一個就要每個 register 一次
		base.Render(writer);
	}
}</pre>
<p>目前,asp.net還不能單獨禁止某個control的validate events功能.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-enjoy">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://wongkalun.idv.hk/2007/08/20/aspnet-event-validation/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://wongkalun.idv.hk/2007/08/20/aspnet-event-validation/&amp;title=ASP.NET+Event+Validation" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://wongkalun.idv.hk/2007/08/20/aspnet-event-validation/&amp;title=ASP.NET+Event+Validation" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://wongkalun.idv.hk/2007/08/20/aspnet-event-validation/&amp;title=ASP.NET+Event+Validation&amp;desc=%5Bhttp%3A%2F%2Fasp.net%20ASP.net%5D%202.0%20%E6%B7%BB%E5%8A%A0%E4%BA%86%20event%20validation%20%E7%9A%84%E5%8A%9F%E8%83%BD%2C%20%E7%94%A8%E4%BE%86%E6%AA%A2%E6%9F%A5%E5%BC%B5%20form%20%E7%9A%84%20variable%2C%20%E5%A6%82%E6%9E%9C%E5%BC%B5%20form%20%E4%BF%82%E4%B8%80%E9%96%8B%E5%A7%8B%E6%99%82%E7%84%A1%E5%B0%87%20possible%20variable%20encode%20%E5%85%A5%E5%80%8B%20session%20%E5%BA%A6%2C%20%E5%B0%B1%E6%9C%83%20throw%20exception%3A%0D%0AInvalid%20postback%20or%20callback%20argument.%20%20Event%20validation%20is%20enabled%20using%20%26lt%3Bpages%20enableE" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://wongkalun.idv.hk/2007/08/20/aspnet-event-validation/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.mister-wong.com/addurl/?bm_url=http://wongkalun.idv.hk/2007/08/20/aspnet-event-validation/&amp;bm_description=ASP.NET+Event+Validation&amp;plugin=sexybookmarks" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.mixx.com/submit?page_url=http://wongkalun.idv.hk/2007/08/20/aspnet-event-validation/&amp;title=ASP.NET+Event+Validation" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://wongkalun.idv.hk/2007/08/20/aspnet-event-validation/&amp;title=ASP.NET+Event+Validation" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://wongkalun.idv.hk/2007/08/20/aspnet-event-validation/&amp;title=ASP.NET+Event+Validation" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://wongkalun.idv.hk/2007/08/20/aspnet-event-validation/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=ASP.NET+Event+Validation+-+http://bit.ly/d1KQ34&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>




		<!-- Added by WP-DragToShare-eXtended Plugin -->
		<script type="text/javascript">
			dtsv.dtse_post_6_permalink = 'http://wongkalun.idv.hk/2007/08/20/aspnet-event-validation/';
			dtsv.dtse_post_6_title = 'ASP.NET Event Validation';
		</script>
		<!-- End of WP-DragToShare-eXtended Plugin -->]]></content:encoded>
			<wfw:commentRss>http://wongkalun.idv.hk/2007/08/20/aspnet-event-validation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
