<?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; Windows7</title>
	<atom:link href="http://klcin.tw/net/category/windows7/feed" rel="self" type="application/rss+xml" />
	<link>http://klcin.tw/net</link>
	<description>Horn Network (.NET, ASP.NET, C#, VB.NET, JavaScript, Ubuntu, Android ...)</description>
	<lastBuildDate>Fri, 04 Mar 2011 07:25:53 +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>ORA-12154: TNS: 無法解析指定的連線 ID</title>
		<link>http://klcin.tw/net/ora-12154-tns-%e7%84%a1%e6%b3%95%e8%a7%a3%e6%9e%90%e6%8c%87%e5%ae%9a%e7%9a%84%e9%80%a3%e7%b7%9a-id</link>
		<comments>http://klcin.tw/net/ora-12154-tns-%e7%84%a1%e6%b3%95%e8%a7%a3%e6%9e%90%e6%8c%87%e5%ae%9a%e7%9a%84%e9%80%a3%e7%b7%9a-id#comments</comments>
		<pubDate>Tue, 15 Dec 2009 09:22:27 +0000</pubDate>
		<dc:creator>klcintw</dc:creator>
				<category><![CDATA[ASP.NET 2.0]]></category>
		<category><![CDATA[IIS7]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Windows7]]></category>
		<category><![CDATA[錯誤處理]]></category>

		<guid isPermaLink="false">http://klcin.tw/net/ora-12154-tns-%e7%84%a1%e6%b3%95%e8%a7%a3%e6%9e%90%e6%8c%87%e5%ae%9a%e7%9a%84%e9%80%a3%e7%b7%9a-id</guid>
		<description><![CDATA[ORA-12154]]></description>
			<content:encoded><![CDATA[<p>環境：Microsoft Windows 7 Ultimate x86, IIS7, ASP.NET 2.0</p>
<p>錯誤：將原本正常的 ASP.NET 2.0 程式建置到 Windows 7 的機器上，發生 ORA-12154 錯誤。</p>
<ul>
<li>ORA-12154: TNS: 無法解析指定的連線 ID </li>
<li>ORA-12154: TNS: could not resolve the connect identifier specified </li>
<li>ORA-12154: TNS: 无法处理服务名 </li>
</ul>
<p>嘗試：</p>
<ul>
<li>用 TNSPING {myTNS} 正常 </li>
<li>修改或移除 web.config 的 <code>&lt;identity impersonate=&quot;true&quot; userName=&quot;user&quot; password=&quot;pass&quot;/&gt; </code>都沒作用。 </li>
<li>參考＜<a href="http://blog.miniasp.com/post/2009/08/Solve-ASPNET-cannot-connect-Oracle-DB-using-Development-Server.aspx" target="_blank">解決 ASP.NET 跑在 x64 機器上無法連接 Oracle DB 的問題</a>＞       <br />將連線字串 <code>User ID=user;Password=pass;Data Source=<font color="#ff0000">myTSN</font>;</code>       <br />改成 <code>User ID=user;Password=pass;Data Source=<font color="#ff0000">(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=???)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=???)))</font></code> 居然沒有錯誤！       <br />所以，連線是正常的，只是找不到 TNS 的定義。 </li>
<li>最後找到＜<a href="http://forums.asp.net/p/1054934/1498691.aspx" target="_blank">Oracle Developer Tools ORA-12154: TNS:could not resolve service name &#8211; ASP.NET Forums</a>＞       <br />在 <code>HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_ODACHome1</code> 加上 <code>TNS_ADMIN</code> 字串 <code>C:\oracle\product\10.2.0\client_1\NETWORK\ADMIN</code> 就OK了！       <br />&#160;
</p>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://klcin.tw/net/ora-12154-tns-%e7%84%a1%e6%b3%95%e8%a7%a3%e6%9e%90%e6%8c%87%e5%ae%9a%e7%9a%84%e9%80%a3%e7%b7%9a-id/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

