Click here to Skip to main content
14,383,961 members
Rate this:
Please Sign up or sign in to vote.
I have old asp.net web application which is moved from windows server 2003 ( i beleieve ) to 64 bit windows server 2008 r2. My application was built in .NEt 2.0 Every time i tried to run the application it throws error like 'ould not load file or assembly 'Oracle.Web, Version=2.112.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. Access is denied' and if i refreshed the page it shows different error like some issue in ServiceModel.
I set the application to run on application pool .Net 2.0. I have set 32 bit false, managed pipe line mode is classic. It is running on Network Service Identity.
When it threw Oracle client exception, i looked into GAC and we do have Oracle web version 2.112.1.0 x86,amd in our server.
When it threw ServiceModel error, i checked applicationHost config, and we do have below settings in the configuration file.
I also tried to build application in .Net 4.0 after changing by changing Oracle Client to Oracle managed access library. Application built successfully without any error but when i tried to publish the application, it threw cannot load MyWebApp.dll error.
I do not know how do i make the application run.

What I have tried:

I set the application to run on application pool .Net 2.0. I have set 32 bit false, managed pipe line mode is classic. It is running on Network Service Identity.
When it threw Oracle client exception, i looked into GAC and we do have Oracle web version 2.112.1.0 x86,amd in our server.
When it threw ServiceModel error, i checked applicationHost config, and we do have below settings in the configuration file.
I also tried to build application in .Net 4.0 after changing by changing Oracle Client to Oracle managed access library. Application built successfully without any error but when i tried to publish the application, it threw cannot load MyWebApp.dll error.
Posted
Updated 17-Aug-18 5:44am

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

This is just a guess but it seems like your site code is compiled to target "AnyCPU". The hint I'm using is that you're using a 32-bit Oracle client and you moved the code to a 64-bit server.

Go into the Project Properties, Build tab, and change the platform target from AnyCPU to x86. Recompile and deploy and see what happens.
   
Comments
istudent 17-Aug-18 11:24am
   
I did as you said, build and publick app targeting to x86, set app pool to .net 2.0, 32 bit enabled, classic managed pipeline, identity to network service but it is still complaining Could not load file or assembly 'Oracle.Web, Version=2.112.3.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. Access is denied.
Dave Kreskowiak 17-Aug-18 11:38am
   
What version of the Oracle Client installed on the server?
istudent 17-Aug-18 11:41am
   
In c:\windows\assembly\ there are oracle client with same version for x86 and amd
Dave Kreskowiak 17-Aug-18 11:51am
   
That doesn't answer the question and that's not where the Oracle Client gets installed. By default, it's off the root of C: in C:\oracle.
istudent 17-Aug-18 11:53am
   
we do not have then. I could see ODP folder but not Oracle
Dave Kreskowiak 17-Aug-18 12:18pm
   
Yep, any library used for Oracle DB access needs the Client installed. In the case of ODP.NET, it requires Oracle Client 8.x or higher, depending on the database version you're querying.

You can get the client from here[^].

I would suggest keeping the code at 32-bit and using the 32-bit Oracle Client. If you've got any other libraries you're using, chances are those are 32-bit only too.

You cannot mix 64 and 32-bit bit in the same process, so if you even have a single library you're using that's 32-bit, everything has to be 32-bit.
istudent 17-Aug-18 12:29pm
   
Sir, odp.net which is installed in our server has both x86 and x64. do you think I do need to or ask my seniors to install the another client?
Dave Kreskowiak 17-Aug-18 13:15pm
   
ODP.NET is NOT the client. It is an interface between your web app and the client.

INSTALL THE CLIENT.
istudent 17-Aug-18 12:49pm
   
Sir, this is not a new application. It is old application and is currently running in old windows server 2003. Attempt here is to migrate the application and make sure if it runs in 2008 so that we could decommissioned our old server. I do not have any knowledge of this application at all.
istudent 17-Aug-18 11:59am
   
in odp read me file, it says Oracle Data Provider for .NET, Managed Driver 12.1.0.1.0
istudent 17-Aug-18 12:11pm
   
now this is what I did, I build the application in .net 4 and target x86 and installed Oracle.ManagedDataAccess from nugget package and set the application pool to .net 4. I got this error "404.2 The page you are requesting cannot be served because of the ISAPI and CGI Restriction list settings on the Web server"

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100