Server Error in '/' Application Error.

Taha Sözgen 10 Reputation points
2023-02-02T08:30:56.1066667+00:00

Hi There;

I have an ASP.NET MVC Application. Its version is .NET 4.5.2. It is facilitating Entity Framework and it is using Oracle Database 19c.

I have found a bug in the application and I solve it. It runs smoothly on my local computer. Whenever I publish the application to an IIS server, I have got the error message below:

" Server Error in '/' Application.

Runtime Error Description: An exception occurred while processing your request. Additionally, another exception occurred while executing the custom error page for the first exception. The request has been terminated. "

The problem was primarily caused by the following error:

There is a duplicate 'oracle.manageddataaccess.client' section defined

There is a section named "oracle.manageddataaccess.client" in my Web.config file. I have renamed it as new.oracle.manageddataaccess.client. Here is my revisioned Web.Config file:

web.config Web config

Here is the trace failed request:

Failed Http Request Trace

Where am I wrong? Thanks in advance.

Internet Information Services
.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,395 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,270 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Sam Wu-MSFT 7,036 Reputation points Microsoft Vendor
    2023-02-03T07:31:22.74+00:00

    @Taha Sözgen

    There are many reasons for this error, you can try below solutions:

    1. You might have to set the application pool for your site in IIS to allow 32bit applications if you're using a 32-bit Oracle connector (even on a 64-bit system). The application pool is 64-bit by default. Right-click on the Application Pool > Advanced Settings > 'Enable 32-bit Applications' set that to true.
    2. You can also check the oracle Data Provider for .NET, Managed Driver Assemblies. The Oracle.ManagedDataAccess.dll assembly provides two namespaces: The Oracle.ManagedDataAccess.Client namespace contains ODP.NET classes and enumerations for the client-side provider.

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. PatriceSc 166 Reputation points
    2023-02-17T13:40:02.0233333+00:00

    Hi,

    It might be that it is already defined in machine.config and as a result it appears twice. See https://learn.microsoft.com/en-us/troubleshoot/developer/webapps/aspnet/development/edit-web-config or https://docs.oracle.com/cd/E63277_01/win.121/e63268/InstallManagedConfig.htm#ODPNT8159

    It likely depends if you prefer to have this configured once for all (maybe also on dev machines ?) or if you prefer each app to explicitely configure this section. I prefer the later so that each app is entirely responsible for its own config besides really very general stuff maybe...

    0 comments No comments