The old question is here, but I just ran into it and wanted to share more detailed information.
First, the easiest solution if you need to make <clear/> in your connectionStrings block is to add an empty entry to the OraAspNetConString connection string back to your web.config:
<connectionStrings> <clear /> <add name="OraAspNetConString" connectionString=" "/> </connectionStrings>
What happens when you install the Oracle.NET package on any of your computers, it installs a ton of different providers in your machine.config along with OraAspNetConString as the machine level of connectionString. The <clear/> element gets rid of this OraAspNetConString, and thanks to the addition of Oracle machine.config, all other Oracle providers loaded by default fail when they cannot find the connectionString.
The other answer here, where you studied the use of the element for membership providers, did not work, because most of the other oracle providers added to machine.config will still look for this OraAspNetConString , so cleaning up only that one provider will not help you.
These are all the providers they installed in my machine.config:
<membership><providers> <add name="OracleMembershipProvider" type="Oracle.Web.Security.OracleMembershipProvider, Oracle.Web, Version=4.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" connectionStringName="OraAspNetConString" applicationName="" /> </providers></membership> <profile><providers> <add name="OracleProfileProvider" type="Oracle.Web.Profile.OracleProfileProvider, Oracle.Web, Version=4.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" connectionStringName="OraAspNetConString" applicationName=""/> </providers></profile> <roleManager><providers> <add name="OracleRoleProvider" type="Oracle.Web.Security.OracleRoleProvider, Oracle.Web, Version=4.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" connectionStringName="OraAspNetConString" applicationName=""/> </providers></roleManager> <siteMap><providers> <add name="OracleSiteMapProvider" type="Oracle.Web.SiteMap.OracleSiteMapProvider, Oracle.Web, Version=4.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" connectionStringName="OraAspNetConString" applicationName="" securityTrimmingEnabled="true"/> </providers></siteMap> <webParts> <personalization> <providers> <add name="OraclePersonalizationProvider" type="Oracle.Web.Personalization.OraclePersonalizationProvider, Oracle.Web, Version=4.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" connectionStringName="OraAspNetConString" applicationName=""/> </providers> </personalization> </webParts> <healthMonitoring><providers> <add name="OracleWebEventProvider" type="Oracle.Web.Management.OracleWebEventProvider, Oracle.Web, Version=4.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" connectionStringName="OraAspNetConString" buffer="true" bufferMode="OracleNotification"/> </providers></healthMonitoring>
So, if you do not want to add an empty OraAspNetConString, you need to make sure that you either <clear/> for each of the following Oracle providers, or go in and add the <remove name=x /> element to each provider class, for example this:
<membership><providers> <remove name="OracleMembershipProvider" /> </providers></membership> <profile><providers> <remove name="OracleProfileProvider" /> </providers></profile> <roleManager><providers> <remove name="OracleRoleProvider" /> </providers></roleManager> <siteMap><providers> <remove name="OracleSiteMapProvider" /> </providers></siteMap> <healthMonitoring><providers> <remove name="OracleWebEventProvider" /> </providers></healthMonitoring>
I never looked at any site code or health monitoring code in my web application, but I still had to manually add these <remove/> elements for different providers in my web file or something failed looking for the OraAspNetConString connection string. which was not there not.