The customer flow is as follows: They open a webapp and hit a button. The button calls URI for the handler protocol which invokes my .NET 6 Console App. My Console app reads the URI and does the needful backend operation.
Now the issue is that when customer hits the button, it opens a new Console App instance for each click.
I can make this a single instance operation by refactoring this Pipe example.
But the opening of second instance which passes info to an already running instance will be visible to customer. I want all this to happen in background without customer's knowledge.
Which type of .NET 6 app will be good for this? Is Console App a good way to do this? Or a worker service? Any links or ideas will be helpful.