Databases :: How To Change Assembly Reference To Oracle.DataAccess In Prod

Mar 8, 2011

In development I installed "ODAC Entity Framework and LINQ Beta (11.2.0.2.30)" so that we could have a 32 bit version of Oracle.DataAccess for ODP.Net. In Visual Studio 2010 (on Windows Server 2008 R2) I made a reference to:

C:Oracleodp.netin4Oracle.DataAccess.dll.This adds: <add assembly="Oracle.DataAccess, Version=4.112.2.30, Culture=neutral, PublicKeyToken=89B483F429C47342" /> to the assembly in the web.config.

We set the AppPool to Enable 32 bit applications and everything works great. For anyone who doesn't know the story here, we do this because Visual Studio 2010 runs in 32 bit so you need the 32 bit ODAC/ODP.net components to get a development environment running. I then publish the files and move to a 64 bit machine.

I downloaded the "ODAC112021Xcopy_x64.zip" Then ran: install.bat odp.net4 c:oracle odac and I can see the Oracle.DataAccess.dll file at: C:Oracleodp.netin4Oracle.DataAccess.dll. Then added c:oracle;c:oraclein;c:oraclein4 to the System Path.

At this point I would think I just replace the version and PulbicKeyToken in: <add assembly="Oracle.DataAccess, Version=4.112.2.30, Culture=neutral, PublicKeyToken=89B483F429C47342" />
on production to the versioin installed on prod. So first thing I do is just remove that line on production to see what error I will get. And I still get the same error:

System.IO.FileLoadException: Could not load file or assembly 'Oracle.DataAccess, Version=4.112.2.30, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Actually this is if I move the new dll into the applicaitons bin directory. If I remove the dll from the directory I get: Could not load file or assembly 'Oracle.DataAccess, Version=4.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified.

So I put the line back in.

I right click on on the new Oracle.DataAccess.dll and click properties. In the details tab I see verion is 4.112.2.0. That makes sense. The 64 bit XCopy version is an earlier build then the 32 bit Beta that comes with Entity Framework and LINQ(Version=4.112.2.30).

So on production I change the Version attribute to: 4.112.2.0. But now I get the same error: System.IO.FileLoadException: Could not load file or assembly 'Oracle.DataAccess, Version=4.112.2.30, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
(This is with the new dll back in the web app's bin directory as is the rest of the thread).

It's still looking for the same version of the assembly. Why is it doing that? The web.config has a connection string with the ODP.Net provider type (Oracle.DataAccess.Client). Which would take from the assembly reference. It should not care what the version number is. Could there be something in code somewhere that is specifically looking for the old dev box version? Just what is the way to make it use the new assembly?

I would think the system would just know where to find the new dll. Just as in development the add reference dialog knew that the dll was in c:oracle... rather then c:program files(x86)... like out-of-the-box Microsoft assemblies.

View 2 Replies


Similar Messages:

Databases :: Could Not Load File Or Assembly 'Oracle.DataAccess' Or One Of Its Dependencies

Jan 28, 2011

I have a vs2008 web application. it built fine and it was runing fine use visual studio development server, but when i use IIS web server, it gave me the following error.

Server Error in '/Vendorapplication' Application.

View 10 Replies

Databases :: Vs2008 Website Project Cannot Add Reference To Oracle.DataAccess.dll

Feb 28, 2011

I have a vs2008 Website project(it was converted from vs2005), when i right click the Website node in the solution and open the property page, i select the references link, then click add reference to Oracle.DataAccess.dll(11g, 64bits), Version=2.112.2.0 in the website BIN directory, it doesn't work, i don't see the Oracle.DataAccess.dll is added, Can you give me any advice why the website project can not add the Oracle.DataAccess.dll ? And I can add rOracle.DataAccess.dll to my other Web Application project, what difference between Website project and Web applicatoin project caused the issue? Since i can not add the Oracle.DataAccess.dll , when i compile, it gave the error:

Could not load file or assembly 'Oracle.DataAccess, Version=2.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. An attempt was made to load a program with an incorrect format.

View 4 Replies

Databases :: How To Connect Using Oracle.DataAccess.Client

May 18, 2010

I want to insert some values (from asp.net web application) in a table on oracle DB that hosted on a machine rather than the machine that hosts the asp.net application

i use "oracle.dataaccess.client" and the following function

[Code]....

but i get the following exception

The type initializer for "Oracle.DataAccess.Client.OracleConnection" threw an exception

View 5 Replies

Databases :: Oracle.DataAccess.Client Very Slow - How To Make It Fast

Oct 29, 2010

When I run my piece of SQL through SQL developer it takes less than half a second with an overall cost of 618 on the explain plan.

When I run the same SQL through .NET via the oracle.dataaccess.client connection it is impossibly slow taking over 5 minutes to run.

What could be causing this and what can I do?

View 7 Replies

C# - Getting A Object Reference Error In Prod Only When Trying To Use The Word DocumentClass?

Feb 25, 2011

I am writing a program that uses a .dotx template and does a merge of data in an aspx page. The program works perfect on my Dev workstation locally but when I deploy it to a test IIS server, it fails on the second line below giving me an Object Reference error.

I ran into problems earlier because the Word Com object was not on the IIS server so I loaded Word onto the server and set permission in DCom and got past that problem. But now I get this error on the line that starts with wRange = . As I said, the program works perfectly locally in debug mode.

Microsoft.Office.Interop.Word.DocumentClass
System.NullReferenceException: Object reference not set to an instance of an object

lines of code:

Document BaseDocument = oWord.Documents.Open(ref oTemplate, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing);
wRange = BaseDocument.Bookmarks.get_Item(ref endOfDoc).Range;

View 2 Replies

Web Forms :: Referring An Assembly In Project / Without Adding Assembly Reference, It Still Accepting And Running Code?

Jul 5, 2010

Before using any class in your website project/page we have to add it's assembly reference to our project. Right?

Now, when I am using SmtpClient class from System.Net assembly after adding the System.Net.Mail namespace in namespace node of application's web.config file but without adding assembly reference to the project, it still accepting and running the code. Why?

I enquired the machine's web.config file located at C:WINDOWSMicrosoft.NETFrameworkv2.0.50727CONFIG but didnt find assembly reference for System.Net there also.

So bit confused how it is working and where the assembly reference has been added and how?

View 1 Replies

Assembly Generation - Reference Assembly Targets Different Processor?

May 2, 2010

I'm getting following warning

Assembly generation -- Referenced assembly 'System.Web.dll' targets a different processor

What does this mean and how do I fix this?

View 1 Replies

Visual Studio - Why Does Website Reference Assembly From GAC, When Adding Local Reference

Jan 7, 2010

When you use ASP.NET web site (instead of web application model) and add reference to an assembly from local folder, Visual Studio, it seems, understands that this local assembly is also in GAC and so does NOT copy this assembly to bin folder (as it does with non-GAC assemblies), but simply adds new record in web.config file.

Why such a behaviour? Is it possible to force copy to bin folder (I need this since .dll is not on target environment)? I can add assembly to bin folder as file and it will work, but in this case bin folder contents will be in source control, which is not good.

View 3 Replies

Databases :: How To Use Oracle 10g Using Toad

Jan 27, 2010

how we can use oracle 10g in asp.net 3.5 using toad

View 1 Replies

Databases :: How To Run The Oracle 32 And 64 Bit Clients

Feb 22, 2011

As the title says I have a Win 7 64 bit dev machine, Win 2K3 32 bit production box and I run against Oracle 10g which Oracle clients do I need to run? Do I need to run the Oracle 32 and 64 bit clients? And if so what versions?

View 1 Replies

Databases :: Connect To Oracle Without DSN?

Oct 4, 2010

I need to find a way to connect to the remote Oracle server without a DSN. There are some practical problem for accessing the server using a DSN. I need a way to connect to Oracle server like I connect to SQL Server etc. For example, in SQL server, I can connect directly with server using Servername (IP adress) + Username + Password + DB Name. Any way to connect to the Oracle server like in SQL Server we do ??

View 6 Replies

Databases :: SqlDataSource On Oracle 64 Bit?

Aug 2, 2010

I have an Asp.net web application targeting .Net2.0 and my databse is oracle, I used SqlDataSource Control to communicate with oracle database its working fine on my development server, but on my production Oracle is 64 bit so im getting an error like

"<asp:ControlParameter doesnot have a property DbType="Int32"> "
i tried with Int64 also but still im getting the same error

following is the markup of sqldatasource i used
<
asp:SqlDataSource
ID="sdsEmployees"
runat="server"
ConnectionString="User Id=user;pwd=user1;server=prod" ProviderName="System.Data.OracleClient"
SelectCommand="GetEmployeeInfo" SelectCommandType="StoredProcedure"
OnSelecting="sdsEmployees_OnSelecting">
<SelectParameters> <asp:ControlParameter
ControlID="txtNumber"
DbType="Int32"
/> </SelectParameters> </asp:SqlDataSource>

View 1 Replies

Databases :: Use Link To Oracle In 4.0?

Jan 3, 2011

tried to use linq to oracle 10g express but it throws an error as I can make no errors because I throw

View 1 Replies

Databases :: Getting Data From Oracle Sp?

Mar 15, 2011

have a sp in oracle which has 3 input parameters and 3 output parameters( 1 ref cursor, i number, 1 varchar2)

Command.CommandText = sp name;
Command.CommandType =
CommandType.StoredProcedure;

i am doing cmd.ExecuteNonQuery();I am able to get the number and varchar2 values from output parameters. But i am unable to get output from Ref Cursor. (How can i get this...)If i use dataadaptor then i am getting the datatable in the dataset(but i am not getting the other two parameters(where will get the other two??)...

View 2 Replies

Databases :: Connect To Oracle DB?

Jul 8, 2010

Is required to install Oracle client software to connect Oracle DB?

As following code will generate exception, prompt:"System.Data.OracleClient requires Oracle client software version 8.1.7 or greater."

using System.Data.OracleClient;

string dataSource ="(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=addr)(PORT=pt))(CONNECT_DATA=(SERVICE_NAME=svc)))";

string connectionString=string.Format("Data Source={0};User Id={1};Password={2};",dataSource,"id","pwd");

using (OracleConnection connection=new OracleConnection(connectionString))

{

connection.Open();

}

View 1 Replies

Databases :: How Make SQL Query Run Under ORACLE

Jan 8, 2010

i have a SQL Query. It works fine in Sql server. let me know how to make it work in Oracle.

You can run below code in Sql server and check. It will work fine. But in Oracle,( I am using TOAD for Oracle )it is giving some errors.

Code]....

View 4 Replies

Databases :: How To Use Oracle Membership Provider For .Net

Apr 13, 2010

to Find website or write to me How to use Oracle Membership provider for ASP.Net and what changes should i do to Web.config and machine.config?

View 1 Replies

Databases :: Connecting To Oracle In A Web Application?

Feb 21, 2011

I am developing a web application with back end as Oracle. I call the procedures from web application when ever some update, create or delete for the records needs to be performed. How to maintain the connection in these scenarios.

Can I open the connection and maintain it through out the application till user logs out?

View 10 Replies

Databases :: InsertUpdateData Error Using C# .net With Oracle Db

Jun 8, 2010

here's my error... Compiler Error Message: CS1502: The best overloaded method match for '_Default.InsertUpdateData(System.Data.SqlClient.SqlCommand)' has some invalid arguments

here's my codebehind:

[Code].....

View 10 Replies

Databases :: Roles In .net / Oracle - What Is Best Practice For This

Apr 20, 2010

I'm using oracle for my asp.net website. In website I have 3 different roles. Now do I need to create as many diff users in oracle as roles?

Someone in team insisted on having as many users in oracle. But then unnecessarily i have to maintain multiple connection strings in app.

like, I have manager/ team leader/ user roles.

Now the team member insists on having 3 users in oracle. then in DAL i've to check role and use corresponding connection string.

This is not very big app, but in all 12-15 aspx pages and some 10 table in oracle to be used only on intranet.

what is best practice for this?

View 2 Replies

Databases :: Migration From Oracle To Sql Server?

Feb 1, 2010

I've developed a web app in Visual Studio 2008 using ASP.NET which connects to an Oracle database and a separate SQL Server 2005 database in the same application.

I want to convert this application to use SQL Server only. I have copied the Oracle tables that I need to SQL Server and am in the process of converting the SQL queries from Oracle format to SQL Server format.

I have also modified all the Connection Strings in web.config to point to the SQL Server database now and not the Oracle one.

However I have come across a problem. The TableAdapters are configured to use the OracleClient in the declarations code behind the scenes, i.e. it is "hard coded". But this causes problems of course while modifying/saving queries, because I don't want any trace of Oracle in my new web app.

The only thing I can think of is to delete all my TableAdapters and re-create them all.

View 6 Replies

Databases :: Migration From SQL Server To Oracle?

Feb 7, 2011

I need to transfer SQL Server databse to Oracle database.

View 2 Replies

Databases :: Add / Retrieve Is Slow In Oracle?

Jul 15, 2010

In my web page I have written code that writes to a table in Oracle 9i. What I find is add ing or querying the table in Oracle is very slow. I tried doing the same with SQL server database and the process if 5 times faster than Oracle. In the Oracle or SQL table I have not created any indexes / primary keys, but still I find the SQL is way faster than Oracle.

Is there any way that I could improve the speed in Oracle? My table has 3 columns (PRVal, FACVal and UserID). And when the user is selected from the web page I retreive the values from the database, using a direct sql (no pl/sql stuff here, as I am new to Oracle). I use OleDBConnection, OleDbCommand and OleDbReaders classes to access Oracle data.

View 1 Replies

Databases :: Insert NULL Value In Oracle?

Mar 5, 2011

I am trying to insert NULL value in oracle database using asp.net form. and its not inserting null value check my below code and guide me what changes I have make

Dim
cn As
New OracleConnection("Data
Source=ab; User Id=abc;Password=abc")
Dim SQL
As
String
'build the INSERT statement
Dim xy
As
New System.Text.StringBuilder
'Dim strDate As Date...............................

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved