Thank you all for watching and for your support. ►► If you want to check out all our courses you can do that here: bit.ly/cdmz-courses
@navyanavilu2639Ай бұрын
The video was very helpful!!! Thank you so much.
@CodeMazeАй бұрын
Glad it was helpful! Thank you too for watching it.
@FearGod1234 ай бұрын
Thank you very much for teaching Windows Service Applications in .NET. Very helpful!
@CodeMaze4 ай бұрын
You are welcome! Glad you like it.
@10Totti4 ай бұрын
Great tutorial!
@CodeMaze4 ай бұрын
Thanks a lot. Glad you like it.
@dushanbaranige37992 ай бұрын
how do we set up profile settings ( deployment mode and Target runtime) when we publish the Windows service on the IIS service?
@LastWinter794 күн бұрын
Thanks for the video. One question: how to pass parameters to the service?
@CodeMaze4 күн бұрын
You are very welcome. Well, I guess you need some sort of parameters to affect the execution logic. But from what I know, you can pass other services to the working service though a constructor injection (as I did with a Logger in this video). So inside your custom service, you can prepare all the logic and all the conditions, then just inject that service inside the worker service class and execute the logic from the custom service.
@Mo-ef9yt4 ай бұрын
Great video. When to use background service vs hosted service vs background task. If i want to perform some (not important) time consuming calculations after performing a save or update to the database which one of the former would be preferred
@CodeMaze4 ай бұрын
Hi, thank you. From one of the online articles: IHostedService conveniently handles short-running tasks using the StartAsync and StopAsync methods. It functions well for tasks like listening to queue messages and invalidating or clearing caches. BackgroundService, on the other hand, runs long-running IHostedService tasks with a single method - ExecuteAsync. So, I think this pretty much explains the difference, but if you want to dive even dipper into the topic, there are a few articles/videos that can help you investigate even further.
@فارسجمال-ح6ك4 ай бұрын
Thanks ❤❤❤
@CodeMaze4 ай бұрын
You are very welcome.
@parko19654 ай бұрын
Hi Marinko, excellent tutorial, one question though - what is the benefit of adding options to the AddWindowsService extension method in the program class. I was assuming that there would be some sort of auto configuration when running sc.exe but you still used the same name when creating the service in windows.
@CodeMaze4 ай бұрын
Hi. Well, that's the real service name that Event Viewer sees. For example, you can use the sc.exe command to create this service (from the video) but using a different name in the command window. That new name will be displayed as a service name in the Service Manager window. But, once you start or stop that service, you will see the name from the configuration in the Event Viewer because that's the real service name. That's why it is the best to create the service with sc.exe command using the same name you configured in the service configuration.
@kunjiMinnu21 күн бұрын
Can we call web api in windows service
@CodeMaze21 күн бұрын
Yes, of course. Just use HttpClient as you would in any other consumer app.
@AslamNazeerShaikh4 ай бұрын
Hey Really Great & Unique Content. Can you do one for Linux Background Service With .NET & Ubuntu or Fedora, please.