Reputation: 303
I am trying to host a WCF Service in IIS, but I am getting the following error. "The configuration section 'oracle.dataaccess.client' cannot be read because it is missing a section declaration "
I have added the following assembly.
add assembly="Oracle.DataAccess, Version=2.111.7.20, Culture=neutral, PublicKeyToken=89B483F429C47342"
and declared
<oracle.dataaccess.client>
<settings>
<add name="SubbType" value="udtMapping factoryName='Project.TypeObjects.TYP_SUBMISSION_PROCESSFactory, PublicKeyToken=NULL' typeName='TYP_SUBMISSION_PROCESS' schemaName='ABC' dataSource='XYZ'"/>
</settings>
</oracle.dataaccess.client>
What can be the reason for this error?
Upvotes: 3
Views: 7594
Reputation: 497
Oracle.DataAccess.Client is the older oracle drivers. In my case I had an app that was using these older drivers, that I did not have installed on my machine. The new managed driver can be installed as a nuget package and I believe this does not require installing the drivers on your machine or changing machine.config.
The steps I used to eliminate the error were (this was all in JUST my entity framework project, and I was able to connect through LINQPad).
These steps allowed me to create a new connection using LINQPad and load the data model and app.config file and read from the underlying tables. I hope this is useful to you. Changing your WCF project should also be a matter of installing the nuget package and correcting the connection string.
Upvotes: 0
Reputation: 1458
Adding this section declaration worked for me:
<configSections>
<section name="oracle.manageddataaccess.client"
type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=4.112.3.50, Culture=neutral, PublicKeyToken=89b483f429c47342" />
</configSections>
Upvotes: 2
Reputation: 411
I also had this problem with IIS 7.5 on 64 bit server and 32bit oracle client and "oracle.dataaccess.client" section was missing only in ...Framework64/v4.0.30319/Config/machine.config. In 32 bit there was section defined. After i added section IIS was able to load web.config in my application.
So I advise you to check both machine configs. ODAC client (32bit/64bit) changes only one.
Upvotes: 1
Reputation: 41
I had this problem with IIS 7.5. What was missing is the "oracle.dataaccess.client" section in the machine.config. Oracle's ODP.NET installer is suppose to add this section to the machine.config, but it was missing. So, as said above, you can add the missing section to your web.config or add the missing section to the machine.config.
Machine.config:
<section name="oracle.dataaccess.client" type="System.Data.Common.DbProviderConfigurationHandler,
System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
Upvotes: 3
Reputation: 174309
As the error says, you are missing a section declaration. Something like this:
<configSections>
<section name="oracle.dataaccess.client"
type="Oracle.DataAccess.ClientSettings, Oracle.DataAccess, Version=2.111.7.20, Culture=neutral, PublicKeyToken=89B483F429C47342" />
</configSections>
Please note: This is just an example, I don't know what exactly is needed for the type
attribute in your specific case.
Upvotes: 6