0

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.

  • Please read this article. https://learn.microsoft.com/en-us/aspnet/core/fundamentals/host/hosted-services?view=aspnetcore-6.0&tabs=visual-studio – Chinmay T Jun 20 '22 at 12:53
  • This is for any background tasks using worker service. You might want to queue your background tasks as well. I believe worker service is better. There is an option for hide console app output check this https://stackoverflow.com/questions/3571627/show-hide-the-console-window-of-a-c-sharp-console-application – Chinmay T Jun 20 '22 at 12:57

0 Answers0