Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Writing a trace file on ASP.NET Core 6

user-ycof8Aug 5 2023 — edited Aug 5 2023

Hello.

I'm having an SSL handshake error when Oracle is configured for TCPS and my ASP.NET core 6 app is trying to connect.

How can I write a trace file in the app to show what the problem with the certificates is exactly?

I'm using Oracle.ManagedDataAccess.Core 3.21.100

With ASP.NET Framework 4 I could have done it by setting my web.config like this:

  <oracle.manageddataaccess.client>
    <version number="*">
      <settings>
        <setting name="WALLET_LOCATION" value=" C:\Oracle\Wallet"/>
        <setting name="TraceLevel" value="7"/>
        <setting name="TraceOption" value="1"/>
        <setting name="TraceFileLocation" value="C:\trace"/>
      </settings>
    </version>
  </oracle.manageddataaccess.client>
  
<system.diagnostics>
    <trace autoflush="true"/>
    <sharedListeners>
      <add name="file" initializeData="c:\trace\network.log" type="System.Diagnostics.TextWriterTraceListener"/>
    </sharedListeners>
    <sources>
      <source name="System.Net" switchValue="Verbose">
        <listeners>
          <add name="file"/>
        </listeners>
      </source>
    </sources>
  </system.diagnostics>  

But I don't know how to do it with ASP.NET core 6 since there is no web.config file.

This post has been answered by Alex Keh-Oracle on Aug 6 2023
Jump to Answer
Comments
Post Details
Added on Aug 5 2023
1 comment
946 views