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

ความคิดเห็น • 51

  • @tutorialsEUC
    @tutorialsEUC  ปีที่แล้ว +2

    🚀 C# Progress Academy - Become a senior C# developer: academy.tutorials.eu/p/csharp-progress-academy

  • @Grond73
    @Grond73 6 หลายเดือนก่อน +3

    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!!!

  • @charlesopuoro5295
    @charlesopuoro5295 หลายเดือนก่อน

    Clear and Concise Explanation of its Use Case. Thanks for this.

  • @sachinkadam8226
    @sachinkadam8226 18 วันที่ผ่านมา

    Appreciate your content man❤

  • @DanijelJames
    @DanijelJames ปีที่แล้ว

    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!

  • @MuhammadAli-qp3yk
    @MuhammadAli-qp3yk 7 หลายเดือนก่อน +3

    .Net also provides the worker service templet, but you created the Web Api template. So what is the difference between both templates?

  • @marierasmussen7799
    @marierasmussen7799 11 หลายเดือนก่อน +2

    This is your store-front. If you want to sell your self to possible customers you need to answer questions and respond to comments.

  • @user-cv1fv9mv3r
    @user-cv1fv9mv3r 5 หลายเดือนก่อน

    Very well explained!!! Thanks.

  • @carlos.maradiaga
    @carlos.maradiaga ปีที่แล้ว +6

    Excelente video, literalmente me salvaste la vida con un proyecto en mi trabajo. Gracias. Saludos.

  • @matuszaprazny
    @matuszaprazny 4 หลายเดือนก่อน

    Great tutorial. Thanks.

  • @slashd
    @slashd 3 หลายเดือนก่อน

    Awesome video, tnx!

  • @elsart6688
    @elsart6688 11 หลายเดือนก่อน

    Thanks for the video, it helped me in my work.

  • @salimsm1804
    @salimsm1804 ปีที่แล้ว +1

    Thanks youuu, you saved me 😮‍💨😮‍💨😮‍💨

  • @HusseinDJasim
    @HusseinDJasim ปีที่แล้ว

    Great explained. Thank you very much

  • @rupeshkamble9105
    @rupeshkamble9105 2 หลายเดือนก่อน

    Thanks, Awesome video

  • @mhsoft2099
    @mhsoft2099 ปีที่แล้ว +1

    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?

  • @mr.nobody4494
    @mr.nobody4494 4 หลายเดือนก่อน +1

    🤔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 👋

  • @g.o.d7030
    @g.o.d7030 7 หลายเดือนก่อน +1

    But when we deploy this on our IIS server, it won't start the application, it throws 500.30 error code.

  • @md.jannatulnayem4328
    @md.jannatulnayem4328 10 หลายเดือนก่อน

    Has been very useful ✨

  • @11Karpovich11
    @11Karpovich11 ปีที่แล้ว

    Thanks for the video! Good job!

  • @thabangkhoza2744
    @thabangkhoza2744 ปีที่แล้ว +2

    Well explained!!!👍

  • @kwentinn
    @kwentinn 9 หลายเดือนก่อน

    Hey, thanks a lot for this cool video! Is it possible to prevent the background service to run when another instance is already running ?

  • @user-hz6ue4tq5g
    @user-hz6ue4tq5g 11 หลายเดือนก่อน

    Thank you a lot!!!

  • @tugrul7639
    @tugrul7639 ปีที่แล้ว

    Thanks dude

  • @joegpapst2129
    @joegpapst2129 ปีที่แล้ว

    Parabéns, a muito tempo procurando uma solução, obrigado

  • @rohanrvs
    @rohanrvs ปีที่แล้ว +3

    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 ?

    • @tutorialsEUC
      @tutorialsEUC  ปีที่แล้ว +4

      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

  • @BennetDumashie
    @BennetDumashie ปีที่แล้ว

    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

  • @neotv15
    @neotv15 10 หลายเดือนก่อน

    Excelente video

  • @emmanuellarteymohammed4534
    @emmanuellarteymohammed4534 ปีที่แล้ว +1

    Thank you

  • @margosdesarian
    @margosdesarian 6 หลายเดือนก่อน

    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?

  • @AhmedMohamed-bt1du
    @AhmedMohamed-bt1du 8 หลายเดือนก่อน

    Then what is the usage of hosted service when it is blocking the main application ?

  • @muttBunch
    @muttBunch 5 หลายเดือนก่อน

    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.

  • @keyable
    @keyable ปีที่แล้ว +1

    How does IsCancellationRequested work? I mean how it knows that Cancellation command was executed?

    • @devmackoy
      @devmackoy ปีที่แล้ว

      Thats included when the async process is done on a specific task

  • @user-kx7kq9xv7x
    @user-kx7kq9xv7x 3 หลายเดือนก่อน

    when I deployed my background service on IIS , its not working, its working on localhost fine
    , please tell the solution

  • @ocamlmail
    @ocamlmail ปีที่แล้ว

    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?

  • @midknight3350
    @midknight3350 ปีที่แล้ว

    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.

  • @joe-sydney-au
    @joe-sydney-au ปีที่แล้ว

    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 ?!

    • @devmackoy
      @devmackoy ปีที่แล้ว

      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.

  • @tamilrasigan5719
    @tamilrasigan5719 ปีที่แล้ว

    Well, How can we run this service once a day. Means like, daily @4pm it should be trigger.

  • @abuchiaroh119
    @abuchiaroh119 ปีที่แล้ว

    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

    • @DJ-vr3xv
      @DJ-vr3xv ปีที่แล้ว

      Hangfire???

  • @anguswalker7511
    @anguswalker7511 7 หลายเดือนก่อน

    So, now it’s running…how do you stop it?

  • @AlexanderBelikov
    @AlexanderBelikov ปีที่แล้ว +1

    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...

    • @ahjsbkdjhavkcjhvac
      @ahjsbkdjhavkcjhvac ปีที่แล้ว

      and the video is so bloated with unnecessary stuff too

    • @BennetDumashie
      @BennetDumashie ปีที่แล้ว

      Hello, can you kindly provide a better implementation? I’m new

  • @oggyoggy3033
    @oggyoggy3033 ปีที่แล้ว

    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.

    • @chaslesjoseph8056
      @chaslesjoseph8056 7 หลายเดือนก่อน

      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?