How to Create Windows Service Applications in .NET

  Рет қаралды 2,753

Code Maze

Code Maze

Күн бұрын

Пікірлер: 20
@CodeMaze
@CodeMaze 4 ай бұрын
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
@navyanavilu2639 Ай бұрын
The video was very helpful!!! Thank you so much.
@CodeMaze
@CodeMaze Ай бұрын
Glad it was helpful! Thank you too for watching it.
@FearGod123
@FearGod123 4 ай бұрын
Thank you very much for teaching Windows Service Applications in .NET. Very helpful!
@CodeMaze
@CodeMaze 4 ай бұрын
You are welcome! Glad you like it.
@10Totti
@10Totti 4 ай бұрын
Great tutorial!
@CodeMaze
@CodeMaze 4 ай бұрын
Thanks a lot. Glad you like it.
@dushanbaranige3799
@dushanbaranige3799 2 ай бұрын
how do we set up profile settings ( deployment mode and Target runtime) when we publish the Windows service on the IIS service?
@LastWinter79
@LastWinter79 4 күн бұрын
Thanks for the video. One question: how to pass parameters to the service?
@CodeMaze
@CodeMaze 4 күн бұрын
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-ef9yt
@Mo-ef9yt 4 ай бұрын
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
@CodeMaze
@CodeMaze 4 ай бұрын
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ك
@فارسجمال-ح6ك 4 ай бұрын
Thanks ❤❤❤
@CodeMaze
@CodeMaze 4 ай бұрын
You are very welcome.
@parko1965
@parko1965 4 ай бұрын
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.
@CodeMaze
@CodeMaze 4 ай бұрын
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.
@kunjiMinnu
@kunjiMinnu 21 күн бұрын
Can we call web api in windows service
@CodeMaze
@CodeMaze 21 күн бұрын
Yes, of course. Just use HttpClient as you would in any other consumer app.
@AslamNazeerShaikh
@AslamNazeerShaikh 4 ай бұрын
Hey Really Great & Unique Content. Can you do one for Linux Background Service With .NET & Ubuntu or Fedora, please.
@CodeMaze
@CodeMaze 4 ай бұрын
Thank you. It will be in my plans for sure.
Create ChatGPT Locally With C# and LLM (Large Language Model)
9:57
Brutally honest advice for new .NET Web Developers
7:19
Ed Andersen
Рет қаралды 303 М.
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 36 МЛН
Каха и дочка
00:28
К-Media
Рет қаралды 3,4 МЛН
When you have a very capricious child 😂😘👍
00:16
Like Asiya
Рет қаралды 18 МЛН
The Easiest Scheduling for Your .NET Applications
11:25
Nick Chapsas
Рет қаралды 76 М.
Can I Run  .NET 7 Minimal API in a Windows Service?
13:25
Codewrinkles
Рет қаралды 10 М.
Tmux has forever changed the way I write code.
13:30
Dreams of Code
Рет қаралды 1 МЛН
5 AMAZING terminal applications you didn't know you needed
8:40
Nick Skriabin
Рет қаралды 3,6 М.
Don't Use Polly in .NET Directly. Use this instead!
14:58
Nick Chapsas
Рет қаралды 75 М.
The Only .NET Scheduler You Should Be Using!
16:38
Nick Chapsas
Рет қаралды 58 М.
How to Create a Windows Service Using C# and Visual Studio!
17:13
LeMaster Tech
Рет қаралды 69 М.
NEVER lose dotfiles again with GNU Stow
14:33
typecraft
Рет қаралды 67 М.
Stop Microsoft from getting your data!
11:45
Liron Segev
Рет қаралды 171 М.
Hangfire in ASP.NET Core - Handle Background Jobs Easily
15:59
Code Maze
Рет қаралды 3,3 М.
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН