<?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>Horn Network &#187; 錯誤處理</title>
	<atom:link href="http://klcin.tw/net/tag/error-handle/feed" rel="self" type="application/rss+xml" />
	<link>http://klcin.tw/net</link>
	<description>Horn Network (.NET, ASP.NET, C#, VB.NET, CSS, JavaScript, Ubuntu, PDA, Windows Mobile ...)</description>
	<lastBuildDate>Sat, 10 Jul 2010 14:44:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>[錯誤處理]LOG: Policy not being applied to reference at this time&#8230;</title>
		<link>http://klcin.tw/net/policy-not-being-applied-to-reference-at-this-time</link>
		<comments>http://klcin.tw/net/policy-not-being-applied-to-reference-at-this-time#comments</comments>
		<pubDate>Tue, 12 Aug 2008 09:21:58 +0000</pubDate>
		<dc:creator>klcintw</dc:creator>
				<category><![CDATA[錯誤處理]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[Index Service]]></category>

		<guid isPermaLink="false">http://klcin.tw/net/%e9%8c%af%e8%aa%a4%e8%99%95%e7%90%86log-policy-not-being-applied-to-reference-at-this-time</guid>
		<description><![CDATA[錯誤訊息：
LOG: Policy not being applied to reference at this time … …LOG: Post-policy reference: …

狀況：
剛建置完成的網站開啟後不久就發生錯誤，表示找不到或無法存取某個DLL（每次都不一定）。
解決方法：
停用索引服務或將 Temporary ASP.NET 目錄排除在索引中。
 
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files
參考資料：

KB-ASP.NET 1.1發生DLL Access is denied錯誤 &#8211; 黑暗執行緒 
MSDN &#8211; PRB：在執行索引服務時修改程式碼發生拒絕存取的錯誤 

]]></description>
			<content:encoded><![CDATA[<h3>錯誤訊息：</h3>
<blockquote><p>LOG: Policy not being applied to reference at this time …<br /> …<br />LOG: Post-policy reference: …</p>
</blockquote>
<h3>狀況：</h3>
<p>剛建置完成的網站開啟後不久就發生錯誤，表示找不到或無法存取某個DLL（每次都不一定）。</p>
<h3>解決方法：</h3>
<p>停用索引服務或將 Temporary ASP.NET 目錄排除在索引中。</p>
<p><a href="http://klcin.tw/net/wp-content/uploads/2008/08/snap016.png"><img title="" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="167" alt="" src="http://klcin.tw/net/wp-content/uploads/2008/08/snap016-thumb.png" width="404" border="0" /></a> </p>
<p>C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files    <br />C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files</p>
<h4>參考資料：</h4>
<ul>
<li><a href="http://blog.darkthread.net/blogs/darkthreadtw/archive/2008/06/12/asp-net-1-1-utility-access-denied-error.aspx">KB-ASP.NET 1.1發生DLL Access is denied錯誤 &#8211; 黑暗執行緒</a> </li>
<li>MSDN &#8211; <a href="http://support.microsoft.com/kb/329065">PRB：在執行索引服務時修改程式碼發生拒絕存取的錯誤</a> </li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://klcin.tw/net/policy-not-being-applied-to-reference-at-this-time/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[錯誤處理]Web Deployment Project</title>
		<link>http://klcin.tw/net/web-deployment-project</link>
		<comments>http://klcin.tw/net/web-deployment-project#comments</comments>
		<pubDate>Tue, 12 Aug 2008 08:35:49 +0000</pubDate>
		<dc:creator>klcintw</dc:creator>
				<category><![CDATA[Visual Studio 2005]]></category>
		<category><![CDATA[錯誤處理]]></category>
		<category><![CDATA[VS2005]]></category>

		<guid isPermaLink="false">http://klcin.tw/net/web-deployment-project-%e9%8c%af%e8%aa%a4%e8%99%95%e7%90%86</guid>
		<description><![CDATA[
環境：WIN2003＋Visual Studio 2005＋Web Deployment Project
aspnet_merge.exe&#34; 以返回碼 1 結束。
錯誤訊息：
&#34;aspnet_merge.exe&#34; 以返回碼 1 結束。      An error occurred when merging assemblies: ILMerge.Merge: ERROR!!: Duplicate type &#8216;DataService&#8217; found in assembly &#8216;App_Web_i7eijh5q&#8217;.

解決方法：

變更專案建置輸出的詳細等級      工具＼選項＼專案和方案＼建置並執行＼MSBuild 專案建置輸出詳細等級       改為「詳細」        
重新建置後就能看到詳細的錯誤訊息，應該是類別名稱重複。   [...]]]></description>
			<content:encoded><![CDATA[</p>
<p>環境：WIN2003＋Visual Studio 2005＋Web Deployment Project</p>
<h2>aspnet_merge.exe&quot; 以返回碼 1 結束。</h2>
<h3>錯誤訊息：</h3>
<blockquote><p>&quot;aspnet_merge.exe&quot; 以返回碼 1 結束。      <br />An error occurred when merging assemblies: ILMerge.Merge: ERROR!!: Duplicate type &#8216;DataService&#8217; found in assembly &#8216;App_Web_i7eijh5q&#8217;.</p>
</blockquote>
<h3>解決方法：</h3>
<ol>
<li>變更專案建置輸出的詳細等級      <br />工具＼選項＼專案和方案＼建置並執行＼MSBuild 專案建置輸出詳細等級       <br />改為「詳細」       <br /><a href="http://klcin.tw/net/wp-content/uploads/2008/08/snap008.png"><img title="" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="221" alt="" src="http://klcin.tw/net/wp-content/uploads/2008/08/snap008-thumb.png" width="404" border="0" /></a> </li>
<li>重新建置後就能看到詳細的錯誤訊息，應該是類別名稱重複。      <br /><a href="http://klcin.tw/net/wp-content/uploads/2008/08/snap009.png"><img title="" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="111" alt="" src="http://klcin.tw/net/wp-content/uploads/2008/08/snap009-thumb.png" width="404" border="0" /></a> </li>
<li>修改重複的型別名稱即可。 </li>
</ol>
<h2></h2>
</p>
</p>
<h3>索引在陣列的界限之外</h3>
<h3>錯誤訊息：</h3>
<blockquote><p>An error occurred when merging assemblies: 索引在陣列的界限之外。</p>
</blockquote>
<h3>解決方法：</h3>
<ul>
<li>可能 Web Service 的 [WebMethod(Description = &quot;中文&quot;)] 有中文字 </li>
<li>可能 AssemblyInfo.cs 有中文字 </li>
</ul>
<h4>參考資料：</h4>
<ul>
<li><a title="http://www.51cto.com/art/200711/61320.htm" href="http://www.51cto.com/art/200711/61320.htm">http://www.51cto.com/art/200711/61320.htm</a>       </li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://klcin.tw/net/web-deployment-project/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
