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!

Oracle.EntityFrameworkCore and SYS_CONTEXT('USERENV', 'HOST')

user-qnf4bAug 12 2023

Hello,

I'm working with .net Core 5.0 EntityFramework 5.0.17 and i have a strange behaviour of SYS_CONTEXT('USERENV', 'HOST') on several environement ( Docker, Windows Service, WebApi, Dbeaver, visual studio)

Result of

 Select SYS_CONTEXT('USERENV', 'HOST') from dual
  • on visual studio debug in local ==><hostname>\<hostname>
  • on DBeaver ==> <hostname>
  • on Deployer IIS Server ==> IIS_APPOOL\<servername>
  • on Windows Server as Service ==> WORKGROUP\<servername>
  • on Docker Image (debian) ==> <hostname>\<hostname>

My understanding right now is userenv is populate by the driver who send this to Oracle. the thing is i need to be sure of what is sended here cause Oracle security allow only trusted hostname.

so if the rule is <domainname>\<hostname> why does it pick IIS_APPOOL, WORKGROUP, or hostname ?

What i need :

i need to configure my applications to have <hostname> or <const>\<hostname> where <const> is a string i initialise on application , or i can configure on Os system.

I would like to know how to configure my computer, or better how to configure my docker, or do i need to configure something in the application ? startup.cs ? HostBuilder ?

Thanks,

Comments
Post Details
Added on Aug 12 2023
0 comments
470 views