How to connect an Oracle Cloud Autonomous Database to an App Service in Azure?

Ricardo Meza 5 Reputation points
2025-11-11T19:32:54.7+00:00

I already uploaded the App via GitHub, the app is up and working, but it cant't connect to an Oracle Cloud Autonomous Database, i already imported the wallet and every standard configuration, the wallet works just fine when running the app in a local enviroment, but it keeps getting the ORA 5000 Connection Time out error every time i run it through the App service in Azure

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
{count} vote

1 answer

Sort by: Most helpful
  1. Praneeth Maddali 2,265 Reputation points Microsoft External Staff Moderator
    2025-11-27T06:34:41.45+00:00

    Hi @Ricardo Meza

    Thank you for reaching out about the ORA-50000 "Connection request timed out" error when connecting your Azure App Service to Oracle Autonomous Database (ADB). This error is often related to network configuration or wallet setup differences between your local environment and the cloud. Please note, if you are using a Free or Shared App Service plan, consider upgrading to at least the Basic tier for full outbound TLS support by using the Scale up option in the portal.

    Key Steps for Resolution:

    1. Activate User Profile Loading In the Azure Portal, navigate to App Service, then select Configuration and go to Application Settings. Add the following setting:

      WEBSITE_LOAD_USER_PROFILE = 1

      This step allows the Oracle wallet to access user profile directories within App Service. Please save your changes and restart the application.
    2. Deploy Wallet Files and Configure TNS
      • Extract the wallet files to a directory within /home/site/wwwroot, such as /home/site/wwwroot/tns for better organization. Using the root directory is also acceptable, as recommended by Oracle.
      • Configure an App Setting.

        TNS_ADMIN = /home/site/wwwroot/tns

      Please ensure that both sqlnet.ora and tnsnames.ora reference SSL_SERVER_DN_MATCH = YES and utilize TCPS on port 1522. You can verify these files through Kudu by navigating to App Service > Development Tools >Advanced Tools.
    3. Network Access Guidelines
      • If you're using the ADB public endpoint, make sure to whitelist your App Service egress IP (found in Properties) in the ADB Access Control Lists (ACLs).
      • To ensure consistent egress, activate Regional VNet Integration and connect a NAT Gateway with a static public IP.
      • For ADB private endpoint usage, set up Azure ExpressRoute and Oracle FastConnect for private connectivity. Tip: Enable ICMP Type 3 Code 4 to support MTU discovery and prevent path issues.
    4. Connection Timeout Adjustment
      • Increase the Connection Timeout value to 180 or higher in your connection string to better manage cloud latency.
      • For .NET applications, set Validate Connection to true in Oracle.ManagedDataAccess.Core. For TNS, add (CONNECT_TIMEOUT=90)(TRANSPORT_CONNECT_TIMEOUT=180) as an example.
    5. Validate Connectivity
      • Run a basic query (SELECT 1 FROM DUAL) to test connectivity and verify DNS resolution and port reachability, such as using the Kudu console with tnsping your_tns_alias. For more information, review the logs in Monitoring → Log stream.

    Reference :

    https://learn.microsoft.com/en-us/azure/app-service/overview-vnet-integration
    https://learn.microsoft.com/en-us/azure/app-service/configure-vnet-integration-enable

    https://learn.microsoft.com/en-us/azure/app-service/overview-inbound-outbound-ips?tabs=azure-portal

    https://learn.microsoft.com/en-us/azure/app-service/reference-app-settings?tabs=kudu%2Cdotnet

    https://learn.microsoft.com/en-us/azure/app-service/configure-common?tabs=portal

    https://learn.microsoft.com/en-us/azure/app-service/troubleshoot-intermittent-outbound-connection-errors

    https://learn.microsoft.com/en-us/azure/load-balancer/troubleshoot-outbound-connection

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.