Building a Windows Service Using C# and .NET Core

preview_player
Показать описание
Building a windows service using .NET Core

- .NET Core 3.1
- Visual Studio
- Serilog
- Windows Service

Nuget Packages & Commands
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Microsoft.Extensions.Hosting.WindowsServices
New-Service -Name {SERVICE NAME} -BinaryPathName {EXE FILE PATH} -Description "{DESCRIPTION}" -DisplayName "{DISPLAY NAME}" -StartupType Automatic

⏱ Timestamps
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
00:00 Introduction
00:48 Building the Windows Service
05:05 Adding Serilog file logging
06:30 Adding Windows Service Code
06:58 Installing the Windows Service
08:35 Wrapping up

🔗 Links
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

👨‍👨‍👦‍👦 Social
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Рекомендации по теме
Комментарии
Автор

⏱ Timestamps
00:00 Introduction
00:48 Building the Windows Service
05:05 Adding Serilog file logging
06:30 Adding Windows Service Code
06:58 Installing the Windows Service
08:35 Wrapping up

jonowilliams
Автор

You’re (literally) the only other person I’ve ever seen that uses Windows 10 enough to know about both “Copy as Path” AND, even far lesser known, you can hide the Search box/icon entirely but you’re still able to search by hitting the Start button and just start typing.

I was satisfied with Copy as Path but truly like “it’s one of my people” when I saw you search without the box or icon.

IocaIhost
Автор

Nice. Props for quick to the point, well organized and link for more info. I think people fear that adding links might lead people away. But since your content is really solid, I stay to watch it first.

DumbGameDev
Автор

Great video again! I like how you took the let's build something concept and added explanations while giving longer learning resources in the description. Inspired me to spend my evening on learning this topic

SuheybBecerek
Автор

This video was super easy to follow along with, and the editing and animations were clean and supported the explanation of the content. Count me in as a subscriber. Thanks Jonathan!

craigryanwallace
Автор

Hey dude, great channel. I got recommended this video and I'm glad I did! Liked/Subscribed. You future is bright my dude, keep making videos!

joshmartin
Автор

Thanx mate! You helped me out a bunch!

neilvermeulen
Автор

Great Video...first time seeing the HoldShift + RightClick...Thanks man

omnix
Автор

Simples, rápido e objetivo. Muito obrigado pelo seu trabalho!!

GabrielFerreira-xdyn
Автор

Thanks, That was a clean and nice tutorial👍

mohammadaliavazpour
Автор

Great video, very concise and covers the important sections. Will surely help me in my job :)

dotnetlover
Автор

awesome... thanks for your time.. subscribed..

chamalliyanage
Автор

Holy shit this was great, thank you! Subb'd

brilliantchicken
Автор

Lots of great information here! Thanks alot for the video!
A little question i have.
IF i want to i.e. gracefully stop the service once it say, has failed a check.. How would i add that to this?
I'm guessing a service should not be stopped using "Environment.Exit" ^^

Xaranthos
Автор

Nice video, i have one question, it's there a way to make a setup for that Worker, to install it with status running automatically?

luisantonioparamoromero
Автор

Hey Jonathan, Its really very useful content. Could you please let us know how to uninstall windows service?

asifrehman
Автор

If you use the system timer class it will use alot less cpu i ran into that issue when using Task.Delay.

anonymoususer
Автор

Hi Jonathan. I was developing a service just like you have shown in the video. It all works fine it does its job perfectly when run from the IDE as well as when double-clicking the .exe file. But I can't make it work as a service. It will just not run. Never. No matter what I do or how I publish it. Any ideas?

TheBdc
Автор

Hi, thank you very much for your tutorial. It is my first time to create windows service, I tried to compile you code and install it as background service. But, the service cannot start because Error : 5 Access is denied. I've run the power shell as the administrator and I've tried change it's status as network service nor administator from service menu but it still doesn't work. Do you have any idea why it always encounters Error : 5 Access is denied?

puppemeister
Автор

Have you tried to do this as a Web job (or is it worker job) in an Azure App Service? Or even as an Azure Function?

kjw