Recently, I have redone the current operating system and changed 9i to 10 Gb. As a result, the newly created web service produces the following error:
System. dllnotfoundexception: Unable to load DLL (oramts. dll ). At system. data. oracleclient. unsafenativemethods. oramtsjointxn (handleref pctxt, itransaction ptrans) at system. data. oracleclient. tracednativemethods. oramtsjointxn (handleref pctxt, itransaction ptrans) at system. data. oracleclient. ocienlistcontext. join (itransaction transaction) at system. data. oracleclient. oracleinternalconnection. enlist (string username, string password, string servername, itransaction transaction, guid transactionguid) at system. data. oracleclient. oracleinternalconnection. activatefordistributedtransaction () at system. data. oracleclient. oracleinternalconnection. activate () at system. data. oracleclient. dbobjectpool. getObject (Object owningobject, Boolean & Isintransaction) at system. Data. oracleclient. oracleconnectionpoolmanager. getpooledconnection (string encryptedconnectionstring, oracleconnectionstring options, oracleconnection owningobject, Boolean & Isintransaction) at system. data. oracleclient. oracleconnection. openinternal (oracleconnectionstring parsedconnectionstring, object TRANSACT) at system. data. oracleclient. oracleconnection. open () at Microsoft. practices. enterpriselibrary. data. database. openconnection () at Microsoft. practices. enterpriselibrary. data. database. executenonquery (dbcommandwrapper command) at resource. mylibservice. validuser (string p_userid, string p_userpass) In E: \ ASPnet \ resource \ WebService \ libservice. asmx. CS: Line 55 At resource. mylibservice. verifycredential () In E: \ ASPnet \ resource \ WebService \ libservice. asmx. CS: Line 41
Web Service Code As follows: [Webmethod (transactionoption = Transactionoption. Required)]
Public String Validuser (string p_userid, string p_userpass)
{
Try
{
//Here are some database read operations.
//Here is the commit transaction
}
Catch (Oracleexception ER)
{
//Roll back a transaction
}
At first it was estimated that there was something wrong with the 10g driver. Online search solution. We found many similar problems. But there is no good solution.
So on the Internet:
His is an Oracle Change, not an MS issue. If you go to otn.oracle.com and
Look up ODP. net, you will find that the two Oracle versions of the ODP (pre
10gAnd10g) Are different, as well. MS has not updated its implementation
For10gYet.
Based on the above statement, I thought 9i should be okay. Then, uninstall 10 GB and reinstall 9i.
The same problem occurs. However, no matter 9i or 10g, the Asp.net page in the same directory as the Web service runs very well. So I was puzzled. I am depressed. At that time, no solution was found.
Some related content is also found online. According to the settings in, it does not work either.
See:Configure Oracle to support distributed transactions under MTS,Using ODP to read and write oracle in MTS is a solution for loading oramts
According to the settings in, it does not work either.
go to the Oracle website. There is no metlink account, so it is hard to find something. There are basically no gains. Later, I decided not to look for it. I checked the code and found out where the problem was.
in view of the poor processing of transactions in the Web service, you can start from the Web Serivce. I tried to replace the transaction processing code. If no transaction is processed, set transactionoption = transactionoption. the required clause is also removed. Running, everything is normal. It seems that the transaction-related component has encountered an error. We can see that Oracle has version 9207 of odp.net on the Internet, so we looked at the main content and saw a Oracle services for Microsoft Transaction Server 9.2.0.7.0 and my machine version 9.2.0.1.0, download and upgrade. Then run the Web service with transaction processing, prompting that the exception of the referenced object is null. The exception that failed to find the DLL file was gone. A burst of ecstasy, haha, not far from success. Some dll may need to be restarted to take effect during installation. Then restart. Try to run. OK! Normal operation. Solve the problem. I feel a lot easier!