ASP.NET 6 BACKGROUND WORKER SERVICES - What you need to know and how to setup one.
ฝัง
- เผยแพร่เมื่อ 20 ส.ค. 2024
- 🏃♂️ Run ASP.NET 6 BACKGROUND SERVICES in 14 minutes. C# makes async tasks this easy!
🚀 C# Progress Academy - Become a senior C# developer: academy.tutori...
👊 Want more C#? Check out our FULL C# Masterclass! www.udemy.com/...
📚 Do you WANT to become a C# Developer? We got you covered!
mng.bz/M5an
We'll make sure to make a Developer out of you in no time!
So, what is C#?
C# (pronounced "See Sharp") is a modern, object-oriented, and type-safe programming language. C# enables developers to build many types of secure and robust applications that run in .NET. C# has its roots in the C family of languages and will be immediately familiar to C, C++, Java, and JavaScript programmers. This tour provides an overview of the major components of the language in C# 8 and earlier. If you want to explore the language through interactive examples, try the introduction to C# tutorials.
And what is ASP.NET?
Free. Cross-platform. Open source.
A framework for building web apps and services with .NET and C#.
ASP.NET is an open-source, server-side web-application framework designed for web development to produce dynamic web pages. It was developed by Microsoft to allow programmers to build dynamic web sites, applications and services. The name stands for Active Server Pages Network Enabled Technologies.
To learn more, make sure to watch the video, and we promise you that you'll become a C# developer in no time! Have fun!
#csharp #aspnet #coding #tutorial #learn #microsoft #net #aspnet #async #workerservice #asynchronous
TAGS
dotnet,csharp,dotnet core,worker service,windows service,dotnet core worker service,.net core tutorial,hosted services,background tasks,.net core,background service,background task,asp.net core,.net background service,.net core background service,asp.net background service,c# worker service,.net,asp.net,c#,Tutorials,Tutorial,Programming,Course,Learn,Step by step,guide,programmer,core,code,asp,asp net,c sharp,sharp,async,asynchronous,task,delay,wait,net6,6.0
tutorialsEU offers you free video tutorials about programming and development for complete beginners up to experienced programmers.
This includes C#, Unity, Python, Android, Kotlin, Machine Learning, etc.
Stay tuned and subscribe to tutorialsEU: goo.gl/rBFh3x
Android: / @tutorialseuandroid
C#: / @tutorialseuc
Unity: / @tutorialseuunity
Facebook: / tutorialseu-1093802040...
LinkedIn: / tutorialseu
Discord: / discord
🚀 C# Progress Academy - Become a senior C# developer: academy.tutorials.eu/p/csharp-progress-academy
I like this video a lot because you start out one way but then make changes. In the process of making changes you offer a concise explanation of why the changes are needed which makes me think about why this is done and it really speeds up the learning process!!!
Sehr gut Herr Leismann!!!
Clear and Concise Explanation of its Use Case. Thanks for this.
Appreciate your content man❤
I am currently using a crib job that connects to a web api that then runs my services on a 5 min schedule. This is MUCH better!
.Net also provides the worker service templet, but you created the Web Api template. So what is the difference between both templates?
This is your store-front. If you want to sell your self to possible customers you need to answer questions and respond to comments.
Very well explained!!! Thanks.
Excelente video, literalmente me salvaste la vida con un proyecto en mi trabajo. Gracias. Saludos.
Great tutorial. Thanks.
Awesome video, tnx!
Thanks for the video, it helped me in my work.
Thanks youuu, you saved me 😮💨😮💨😮💨
Great explained. Thank you very much
Thanks, Awesome video
Thank you, the teaching is very good, but I have a question to ask, if I want to use cron to support it? Because this allows more flexible timing to perform background tasks. How to implement cron in such a way?
🤔Is the course updated to Angular 17 and .Net 8? Because in both version 17 of Angular and version 8 of .NET there are new things that could be implemented, along with others that have either changed or improved. I think it's worth having the course updated, if it isn't already. Thanks in advance 👋
But when we deploy this on our IIS server, it won't start the application, it throws 500.30 error code.
Has been very useful ✨
Thanks for the video! Good job!
Well explained!!!👍
Glad it was helpful!
Hey, thanks a lot for this cool video! Is it possible to prevent the background service to run when another instance is already running ?
Thank you a lot!!!
Thanks dude
Parabéns, a muito tempo procurando uma solução, obrigado
Will this create any performance problem for the API application if both API and Background Services are running parallelly ? Can we create the same background service using a console application that will run independently ?
For sure the background service needs some memory. It really depends on the tasks that are running and how frequently you run them. If you keep it easy and if your hosted machine has a good amount of RAM you should not notice any kind of performance issues.
You could create a console app that handles some other stuff but for sure it is outside of the scope of your asp net application. If this is acceptable, you can do it this way :-)
Greets,
Jannick
I just watched this video, Thank you. Would i be able to deploy this in IIS. Because im having difficulty in trying to deploy a woker service
Excelente video
Thank you
I dont want to run it over and over - i want a specific job to be run asynchronously when a specific event happens in another part of the application - how do i do that?
Then what is the usage of hosted service when it is blocking the main application ?
I have an issue in my app running as a background service, the task runs and completes every 30 seconds, on a loop, but the dang thing just keeps killing memory. I let it go for 9 hours and to start, the first time it ran, used 30meg of RAM but when I looked, 9 hours later, it was up to 4gig of memory. Everything is in "using" blocks where possible, but I just don't understand why it keeps crushing memory.
How does IsCancellationRequested work? I mean how it knows that Cancellation command was executed?
Thats included when the async process is done on a specific task
when I deployed my background service on IIS , its not working, its working on localhost fine
, please tell the solution
Thank you! Am I right that asp servicec is blocked because it's hosted service run in infinite loop and supposed to be foreground, hence lock?
Is there a way to make a WPF app run three threads at once? There is something I'd like to make for work and it will require 3 different threads. It's all the same process with only a few slight differences like using ssh to communicate with 3 units with 3 different IP addresses among other things.
Ok, so you've done the mechanics of how to write a Background worker Service, something I've done even in .NET 2.0 twenty years ago !! BUT what is your purpose of associating a Background Worker service with a WebAPI project ?!
Like he said in the video. This is can be used for anything such as sending an email, updating database, logging information tasks while the WebApi is running in parallel.
Well, How can we run this service once a day. Means like, daily @4pm it should be trigger.
thank you, please how can I use background task to update my database.
I want it to perform some calculation and update my database base on certain condition and if the condition and once the condition is no longer met, it should stop.
please any suggestions
Hangfire???
So, now it’s running…how do you stop it?
A very poor tutorial. Calling .Wait() should be avoided at any cost. Here it was very easy to avoid but it was not done. It's better to get more experience before trying to teach others...
and the video is so bloated with unnecessary stuff too
Hello, can you kindly provide a better implementation? I’m new
Hey,After publishing on iis Background Services are not working,Means its shows swagger/index.html and its opens,But data is not gowing into the database,And Working Successfully on working.
I get the same error with iis 10, it doesn't start automatically, there must be some call request(view browser page defaut v.v.) to start the Background Service. Did you solve this problem?