Windows Service
Sergey .NET
by Sergey Migalnikov
5y ago
I decided to write a blog serie about Windows Services. All blog posts I found about it, is kind of outdated and not covering all functionality any developer need to create Windows Services. Here is the list of topics I am going to coverWhat is Windows Service and why should you careCreate and install our first Windows Service as simple as possible Scheduling and simple exception handling for Windows ServiceLogging to Azure Application Insights for Windows ServiceDependency Injection and  how to make Windows Service async/await friendlyCreate some business logic for Windows ServiceCreate usefu ..read more
Visit website
Logging to Azure Application Insights for Windows Service
Sergey .NET
by Sergey Migalnikov
5y ago
Here is the link to the "home page" for this blog serie.The next point of interest is logging. The logging is very important for application life cycle. Take time and be careful when you pick up which logging tools/software you are going to use. If you can use Azure just use Application Insights and you done. It's just unbelievable good microsoft product and you can log there from everywhere. Take a look at docs. It's very easy to configure and use. Another option is of cause  log to database, but you have to find out how you are going to visualize your data. Don't use Event Viewer. Event View ..read more
Visit website
Scheduling and exception handling for Windows Service
Sergey .NET
by Sergey Migalnikov
5y ago
Here is the link to the "home page" for this blog serie.Next step is to add scheduling. Normally you implement windows service because you want to perform some task multiple times, for example each five minutes or once a day.We utilize a Timer class and move the MyService class to separate file.Now the structure looks like thisSolution ExplorerAnd MyService.cs looks like thisusing System.ServiceProcess; using System.Timers; namespace WindowsServiceTemplate { public class MyService : ServiceBase { public Timer Timer { get;protected set; } public MyService ..read more
Visit website
Create and install Windows Service
Sergey .NET
by Sergey Migalnikov
5y ago
Here is the link to the "home page" for this blog serie.I created a new Azure DevOps project and called WindowsService. How to create Azure DevOps account read this blog and how to create new project read this. Create new repository and call it for example WindowsServiceTempateWindowsServiceTempate repoTo take a look at my repository, use following commandhttps://sergeydotnet@dev.azure.com/sergeydotnet/WindowsService/_git/WindowsServiceTemplate Start Visual Studio 2019, if you dont have one download from here.Visual Studio start displayChoose Continue without code.Create new solution by click ..read more
Visit website
What is Windows Service and why should you care
Sergey .NET
by Sergey Migalnikov
5y ago
Here is the link to the "home page" for this blog serie.Comming...Here is the link to the "home page" for this blog serie.Links in this blog"Home page" for this blog serie ..read more
Visit website
Create Azure App Service with Azure DevOps using Terraform
Sergey .NET
by Sergey Migalnikov
5y ago
We start with my public Azure DevOps project TerraformConfiguration. To get started with Terraform read my blogs: Get started with TerraformUsing Terraform with Azure DevOps or Using Terraform with Azure DevOps using YAML.Create a new Azure DevOps repo. Read this blog how to do it Create a new project Azure DevOps and call it AzureAppService  New repositoryClick on Create.Remember to edit your .gitignore file to ignore some auto generated files and secretsOpen your .gitignore file and add#Terraform **/*.tfstate* **/*.tfvars .terraform/ Take a look at my repo.Open the folder using Visual Studi ..read more
Visit website
Continuous Integration(CI) using Azure DevOps Pipelines
Sergey .NET
by Sergey Migalnikov
5y ago
To get started with Azure DevOps create an account as I described here. I am going to use my public Azure DevOps project here.First we are creating a build pipeline. Go to your Azure DevOps project and click on Pipelines then click on BuildBuild pipelineClick on New pipelineSource ControlChoose Use the visual designerChoose your source control, in our case we choose Azure Repos Git, simply because we are using Azure DevOps for source control and MyVeryFirstAPI repo we created in this blog and click on Continue.Our application is .NET Core application and we choose .NET Core template. Just star ..read more
Visit website
Continuous Integration(CI) using Azure DevOps Pipelines and YAML
Sergey .NET
by Sergey Migalnikov
5y ago
To get started with Azure DevOps create an account as I described here. I am going to use my public Azure DevOps project here and the application as start point, we created here. Clone the repo and open it in the Visual Studio or Visual Studio Code. Here you can read how to download both.Right click on the solution node and click on Add -> New Item...New ItemThere is no yaml file template yet but just find a text file and rename the extensionNew YAML fileCall it f.ex. api-build-pipeline.yamlThen paste the following code variables: buildConfiguration: 'Release' steps: - script: dotnet res ..read more
Visit website

Follow Sergey .NET on FeedSpot

Continue with Google
Continue with Apple
OR