.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

32 Bit ASP.Net App using System.Data.OracleClient trying to load 64 bit System.Data.OracleClient?

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :ASP.Net

We have a ASP.Net app.
We run it in 32 bit on Prod because we have a Dundas Control that can only run in 32 bit.

This application uses out-of-the-box System.Data.OracleClient.

But on prod it seems to be trying to load the 64 bit version. Our app-pool is set to 32 bit.
I would think it would know to load the 32 bit version of System.Data.OracleClient.  But it doesn't.

We do have Oracle's 64 bit Oracle.DataAccess.OracleClient installed on Prod because most of our apps run in 64 bit and our newer apps use Oracles's DataProvider.

Does anyone know how to get a 32 bit app to load the 32 bit System.Data.OracleClient so I don't have to go back into the code and change all of this to the ODP driver?  Even that won't work because the ODP.Net driver is 64 bit and our Dundas App runs in 32 bit.

This is the actual error we get:


[BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)]

[InvalidOperationException: Attempt to load Oracle client libraries threw BadImageFormatException.  This problem will occur when running in 64 bit mode with the 32 bit Oracle client components installed.]

But this is the reverse of our pro

View Complete Post

More Related Resource Links

Cannot convert from 'int' to 'System.Data.OracleClient.OracleParameter' - Problem with OracleHel

Hi I downloaded the OracleHelper.cs & I use VisualStudio 2008,I'm suppose to pass values to a stored procedure which accepts 2 parametersWhen i pass from codebehind it says,Cannot convert from 'int' to 'System.Data.OracleClient.OracleParameter'Cannot convert from 'string' to 'System.Data.OracleClient.OracleParameter'The best overloaded method match for 'DataWrapper.ExecuteNonQuery(string, System.Data.CommandType, string, params System.Data.OracleClient.OracleParameter[])' has some invalid argumentsI'm posting mycode,Using STORED PROCEDURE,OracleHelper.ExecuteNonQuery (con, CommandType.StoredProcedure, "sample", Int32.Parse(TextBox1.Text),TextBox2.Text); Plz help !______________________________________If possible,  tell me a solution for this error too !http://forums.asp.net/t/1598804.aspx

System.Data.OracleClient Depreciation in .net 4.0


hello everyone,

Till now i was using asp.net 2.0 and vb.net 2.0 with oracle 10g to maintain and develop a complex software.My primary focus of this problem is oracle connection. Earlier i was using  System.Data.OracleClient  for making connections to database. Now i m goin to upgrade the whole source code to .net 4.0(asp.net and vb.net both) however database is not gonna change(Oracle 10g only). Microsoft data provider  System.Data.OracleClient  is depriciated in .net 4.0. It says i have to use ODN.NET or third party data providers. I wanna know how to use ODN.NET with .net 4.0 and oracle 10g.

Is System.Data.OracleClient.dll deprecated?


I have a web application that has been using the System.Data.OracleClient.dll for the past 3 years. Recently we've been having some performance issues on the database server and it appears that this app is now causing problems when connecting to our Oracle database.

I've found an updated client at the Oracle website: http://www.oracle.com/technetwork/topics/dotnet/index-085163.html

My question is: Is it necessary for me to update to this new client?

We are running Oracle 11g on 64-bit servers in a cluster.

The app is running on a Windows Server 2008 R2 64-bit machine using ASP.NET 4.0. The app was built using Visual Studio 2005 Team Suite on a 32-bit machine. It was re-compiled on a 64-bit machine and imported into Visual Studio 2010 Professional in order to switch the target framework to .NET 4.0. Then it was deployed to the server. This basically updated the Web.config file for us, the rest of the site remains the same as before.

All suggestions and thoughts are welcome.


Is there a 64-bit version of System.Data.OracleClient?

We have several ASP.NET applications that are currently running on 32-bit Windows Server 2003 machines.  Most of our code was written using Microsoft's System.Data.OracleClient library rather than Oracle's Oracle.DataAccess library. 

We are in the process of upgrading to new 64-bit machines running Windows Server 2008.  Is there a 64-Bit version of System.Data.OracleClient, or do we need to convert all of our applications to use Oracle.DataAccess?  We do not want to run WOW as we desire to convert all of our ASP.NET applications to run in IIS as 64-bit.

Thank you.

System.Data.SqlClient.SqlException: Bulk load data was expected but not sent

Hi everyone We've had this error twice now from our C# code. Nothing is changing the columns, but I've noticed though that it appears to happen when two threads are attempting to bulk insert into the same table, generally millions of rows. The docs say that SqlBulkCopy.WriteToServer is not guaranteed to be thread-safe, but is this the problem here? It feels like it. I've seen some posts where people appeared to have experienced problems in similar circumstances (http://social.msdn.microsoft.com/forums/en-US/sqldatabaseengine/thread/85d51484-6381-46bc-bcce-63b58b362d2d). There is no identity column just a non-unique clustered index that is (spid) process keyed to each thread. Do I need to synchronise access to the table for WriteToServer - is this a known problem? Many thanks Reg --- System.Data.SqlClient. SqlException: Insert bulk failed due to a schema change of the target table.   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)   at System.Data.SqlClient.SqlBulkCopy.WriteToServerInternal()   at System.Data.SqlClient.SqlBulkCo

Could not load file or assembly "System.Data.DLL" or one of its dependencies

Could not load file or assembly "System.Data.DLL" or one of its dependencies

system.io.fileloadexception - could not load file or assembly system.data.sqlserverce version=3.5.1.



my application raises this exception but the file system.data.sqlserverce.dll is in the folder of the application, and the version is correct.


do u have any idea about this problem ?


thanks in advance for every answer Smile


hello from switzerland !



Could not load file or assembly 'System.Data.SqlServerCe, Version=,...

We have an application that runs on both Windows Mobile and Desktop, both which are now using SQL Server Compact 3.5 SP1 as the database.  Everything is working great on the WM side in debug and runtime, but on the desktop side we are getting the following error.

"Could not load file or assembly 'System.Data.SqlServerCe, Version=, Culture=neutral, PublicKeyToken=3be235df1c8d2ad3, Retargetable=Yes' or one of its dependencies.  The given assembly name or codebase was invalid.  (Exception from HRESULT: 0x80131047)"

I do not get this error when I run in debug mode for the desktop app, but if we install the application to a Vista (32bit) or Windows Server 2003 (32bit) machine we get the error.  The only thing I can point at that is different between all the different machines we have tried this on is that it always works if Visual Studio is installed on the machine.  

Our current deployment method is to mark the System.Data.SqlServerCe ( reference to Copy Local=False and then we package the SQL Server Compact 3.5 SP1 installer with our installation program.  I have verified that the dll's are in the GAC with the correct version, but the application cannot find an assembly.  I have also tried copying all the sqlce*.dll files (a

The type 'System.Data.Linq.DataContext' is defined in an assembly that is not referenced. You must



This is frustrating, and I don't know how to solve it.

I have a strange problem. I am adding a LinqDatasource object, and set the context:

        protected void LinqDataSource_ContextCreating(object sender, LinqDataSourceContextEventArgs e)
            e.ObjectInstance = new KaruselaDataContext(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);

Then I get this error:
The type 'System.Data.Linq.DataContext' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data.Linq, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089'.


On web.config I already have this:
<add assembly="System.Data.Linq, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>

NOTE: The datacontext is in a different project (DLL proect) where I added a refernce to System.Data.Linq.

is there another way adding a refernce to a web project? or only though teh web.config?


Data Points: Revisiting System.Transactions


The System.Transactions namespace of the Microsoft .NET Framework makes handling transactions much simpler than previous techniques. Read all about it this month.

John Papa

MSDN Magazine November 2006

Data Points: ADO.NET and System.Transactions


The Microsoft® . NET Framework versions 1. 0 and 1. 1 represented major changes in software development. However, one important thing that did not change much was support for distributed transactions.

John Papa

MSDN Magazine February 2005

Exchange 2000 WSS: Web Storage System Improves Exchange Data Accessibility


The Web Storage System (WSS) in Exchange 2000 is a Web-accessible database that stores any type of data such as e-mail, contacts, appointments, threaded discussions, and multimedia files, and renders the data in HTML in any browser. WSS is based on Internet standards, therefore data can be accessed through URLs, an Exchange OLE DB provider, drive mapping, XML, and Web Documenting and Versioning (WebDAV). This article discusses the WSS schema and how to extend the default schema for custom data. A sample application that uses a custom schema and a custom form to display WSS data is available for download.

Sean McCormick

MSDN Magazine May 2001

Business Data Error: System.OverFlowException


I have a Business Data Catalog file I've uploaded to connect to our back end Firebird DBMS through ODBC.

The SharePoint server is MOSS 2007 x64. The web front end server(s) all have an x64 Firebird Engine and ODBC driver with verified connectivity to Firebird.

When I use one of the methods, I can see connections being made to our Firebird server and the query being passed. I know the query returns results (it's a stored procedure with no parameters), but I get the following error "An error occurred while retrieving data from MROTest1. Administrators, see the server log for more information" in IE. If I look in the server logs, I see (12\Hive\Logs)

Exception handed to HandleRuntimeException.HandleException System.OverflowException: Arithmetic operation resulted in an overflow.     at System.Data.Odbc.OdbcDataReader.GetData(Int32 i, SQL_C sqlctype, Int32 cb, Int32& cbActualOut)

Fed Up With System.Data.Metadata.Edm.ObjectItemAssemblyLoader

I'm fed up with the random errors I'm getting on my ASP.NET 4, Entity Framework 4 web application lately. It seems to stem from something that System.Data.Metadata.Edm is doing with a call to System.Reflection.Assembly.GetTypes(). I keep getting the error that I complained about previously : Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. To display those Loader exceptions, I added the following to my global.asax file: Sub Application_Error...(read more)

System.Data.SqlClient.SqlException: Login failed for user . Reason: The account is disable


Hi All,

Thank you for advance.

I created a widows service for mail schedule with c#.net and sql server 2005 and it is working fine for past one year.

now sometimes i am getting the "System.Data.SqlClient.SqlException: Login failed for user '<UserName>'. Reason: The account is disabled." error.

then i restarted the windows service manually and working.

what is the problem in my sql server connection and how to fix that issue?

System.InvalidOperationException: Invalid attempt to read when no data is present.


Invalid attempt to read when no data is present.

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: Invalid attempt to read when no data is present.

Source Error: 

Line 53:             if (reader.HasRows)
Line 54:             {
Line 55:                 Response.Write(reader.GetString(0));

Here is my code:

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend