webconfig
<add name="HmFrameWorkEntities" connectionString="metadata=res://*/HMFW.csdl|res://*/HMFW.ssdl|res://*/HMFW.msl;provider=Oracle.DataAccess.Client;provider connection string="DATA SOURCE=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.44.153)(PORT=1521))(CONNECT_DATA=(SID=AA));PASSWORD=dbframework_gz369;USER ID=dbframework_gz"" providerName="System.Data.EntityClient"/>
<add name="StrConn" connectionString="DATA SOURCE=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.44.153(PORT=1521))(CONNECT_DATA=(SID=AA)));PASSWORD=dbframework_gz369;USER ID=dbframework_gz;" providerName="System.Data.SqlClient"/>
tnsnames.ora 配置:
BB=
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.44.151)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = AA
)
)
问题原因
BB是plsql登陆的别名,sid是 (SERVICE_NAME = AA)
webconfig sid换成AA