locked
Oracle Connection Error in Windows Server 2003 (64-bit OS) RRS feed

  • Question

  • User-933735073 posted

    Hi,

    I have developed a Web Application in ASP.Net 4.0 in Windows 7. I connected to a Remote Oracle Database (with Read Only Permission) using Provider=OraOLEDB.Oracle AND Provider=MSDAORA. Both is working Fine when I am running it in Visual Studio 2010 and in IIS7 (with TRUE to Enable 32 bits Application).

    But when I copied it my Server which is in Windows Server 2003 (64-bit OS) with IIS 6.0 it is throiwing Error that MSDAORA is Not Registered in Local Machine AND same with OraOLEDB Not Registered in Local Machine.

    When I changed setting in IIS 6.0 to run the Application as 32-bit Application, whole site stops working throwing an error SERVICE UNAVAILABLE.

    I already installed Oracle11g Provider for OLE DB-64bit AND Oracle Data Access Components (ODAC) in the Server but No posiitive Results has come yet.

    Please advice on how to proceed to tackle such errors.

    Thanks

    -Sumit

    Monday, September 10, 2012 9:20 AM

Answers

All replies

  • User-287491473 posted

    Could you add the full error messages that you are getting?  That will help a lot in determining the source of the issue.  I too have had many issues deploying applications that use Oracle :)

    Tuesday, September 11, 2012 2:44 PM
  • User269602965 posted

    I would have installed the Oracle ODP.NET CLIENT INSTALLATION 32-bit on the 64-bit machine to run 32-bit compiled applications,

    and make sure the compiler is not set to AUTO, but force 32-bit.

    When you uninstall the 64-bit Client, remove the ORacle Key from HKEY LOCAL MACHINE > SOFTWARE in the registry,

    and remove manually the remaining Oracle files.

    Another useful thing I do in mixed environments is put the desired OracleDataAccess.dll file into the application /BIN dir and make a local reference to it instead of referencing the GAC.

    Tuesday, September 11, 2012 5:04 PM
  • User-933735073 posted

    Hi, The detailed error Goes here

    The 'OraOLEDB.Oracle' provider is not registered on the local machine.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.InvalidOperationException: The 'OraOLEDB.Oracle' provider is not registered on the local machine.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


    Stack Trace:

    [InvalidOperationException: The 'OraOLEDB.Oracle' provider is not registered on the local machine.]
       System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) +1761342
       System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection) +1777302
       System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) +100
       System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) +43
       System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +6296143
       System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +6296606
       System.Data.OleDb.OleDbConnection.Open() +48
       Asset_Track.test.Button4_Click(Object sender, EventArgs e) in C:\Users\a514941\Documents\Visual Studio 2010\WebSites\Asset_Track\test.aspx.vb:38
       System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +154
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3691
    

     

    Could you add the full error messages that you are getting?  That will help a lot in determining the source of the issue.  I too have had many issues deploying applications that use Oracle :)

    Wednesday, September 12, 2012 1:59 AM
  • User-933735073 posted

    Hi Lannie,

    Thanks for the reply. Actually my application is developed in 64-bit machine (VS2010 on Win7). And I have deployed it on Win 2003 (64-bit OS with IIS 6.0) When I am Forcing the IIS 6.0 to run as 32-bit application, whole site stops giving error SERVICE UNAVAILABLE.

    Regarding adding OracleDataAccess.dll in BIN Folder, I did same way, But with No Results.

    Do we have any separate DLL file available for OracleDataAccess which is made for 64-bit?

    I would have installed the Oracle ODP.NET CLIENT INSTALLATION 32-bit on the 64-bit machine to run 32-bit compiled applications,

    and make sure the compiler is not set to AUTO, but force 32-bit.

    When you uninstall the 64-bit Client, remove the ORacle Key from HKEY LOCAL MACHINE > SOFTWARE in the registry,

    and remove manually the remaining Oracle files.

    Another useful thing I do in mixed environments is put the desired OracleDataAccess.dll file into the application /BIN dir and make a local reference to it instead of referencing the GAC.

    Wednesday, September 12, 2012 2:03 AM
  • User-287491473 posted

    I havn't seen this specific error before, but it looks like it could be a permissions issue on your orcale home directory or an issue with the Oracle installation.  It looks like several people were able to fix this by granting read and execute permissions on the oracle home directory for IIS and Authenticated User accounts.  Below are a few discussions on this. 

    http://forums.asp.net/p/87242/331004.aspx

    http://www.orafaq.com/forum/t/38330/0/

    http://www.experts-exchange.com/Programming/Languages/.NET/Q_20508176.html

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, September 12, 2012 9:58 AM
  • User-933735073 posted

    Hi,

    Thanks everyone's Advice.

    Installing 64-bit Oracle 11g Client on the Server has resolved the problem. After Installation DO NOT Chnage to "RUN AS WIN32 Application" in IIS

     

    I havn't seen this specific error before, but it looks like it could be a permissions issue on your orcale home directory or an issue with the Oracle installation.  It looks like several people were able to fix this by granting read and execute permissions on the oracle home directory for IIS and Authenticated User accounts.  Below are a few discussions on this. 

    http://forums.asp.net/p/87242/331004.aspx

    http://www.orafaq.com/forum/t/38330/0/

    http://www.experts-exchange.com/Programming/Languages/.NET/Q_20508176.html

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, September 26, 2012 1:18 AM