Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8580583
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:51:42+00:00 2026-06-11T20:51:42+00:00

I wrote a console application in C# that uses ODP.NET to listen to database

  • 0

I wrote a console application in C# that uses ODP.NET to listen to database change notifications from an Oracle database. The console application works perfectly. I wrote a Windows service with the same code, but in the Windows service OracleDependency.OnChange is never firing.

Here is the code I am using to register for a database change notification:

string sql = GenerateQuery();
using (OracleConnection conn = new OracleConnection(connectionString))
using (OracleCommand cmd = new OracleCommand(sql, conn))
{
    conn.Open();

    // Register a listener for the database change notification event
    OracleDependency dep = new OracleDependency(cmd);
    dep.OnChange += (sender, args) =>
        {
            // Do stuff..
        };
    cmd.ExecuteNonQuery();
}

I can see the notification in the database by querying the user_change_notification_regs table, but the client never receives the callback. Again, in the console application version (with the same code), the client receives the callback perfectly.

The Windows service is running as a Network Service. I have also tried Local System, and neither appear to be working. Any ideas?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T20:51:43+00:00Added an answer on June 11, 2026 at 8:51 pm

    The service needed an exception in Windows Firewall. It worked flawlessly after adding the exception.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wrote a console application which produces backup from my database and then compresses
I wrote a quick console application that uses SharePoint dll files. If I attempt
I added a table to a database that my application uses and wrote some
I'm writing a console application under Ubuntu that uses the serial port. It needs
I could use some suggestions / ideas. I wrote a console application that queries
I'm exploring MSMQ services, and I wrote a simple console client-server application that sends
My goal is to create a simple Win32 Console application that uses HunSpell to
I wrote a Console Application that reads list of flat files and Parse the
I wrote an unit-test using MSTest for my Application which uses functionality from a
A few months back I wrote a VB.net console application to migrate a group

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.