
Image from Pexels
Tagged articles - Service
Found 15 articles tagged with Service
15
Oct
2019
Increase service resilience using Polly and retry pattern in ASP.NET Core
.NET229 titlesRetry pattern in ASP.NET Core with Polly
0
Whether you are doing micro-services or mid-size monolith applications that do not have to be too distributed, there is a big chance that you will depend on some external HTTP service. Whether it is REST, SOAP or any other type of the response, your application flow depends on it's response.
Sure using queues and event-based communication between services or components will definitely increase the resilience of the application and make more error-proof, it adds additional complexity to the whole solution and sometimes that can be an overhead depending on the application type or the infrastructure you might be limited with.
...read more
26
Aug
2018
Creating Windows service and Linux daemon with the same code base in .NET
.NET229 titlesCross-platform service with C# and .NET Framework
0
Few months back I wrote an article on how to create Linux daemon in .NET Core using generic host class introduced in 2.1 version of .NET Core. This code works just great on Linux OS when configured as a daemon in systemd and provides more less same concept you would have with Windows Service written in .NET Framework 4.x.
The code works just fine on both Windows and Linux hosts, but because it is compiled as a Console Application, you do not really get to run it on your Windows machine as a Service...read more
14
Jun
2018
Clean service stop by handling SIGTERM on Linux with .NET Core 2.1
.NET229 titlesApplication stop with SIGTERM handling in .NET Core 2.1 on Linux using generic host
0
Some time ago I wrote about setting up .NET Core service/daemon on Linux. Back than I was using .NET Core 2.0 SDK on both development Windows machine and Linux host machine...read more
13
Jun
2018
Advanced versioning in ASP.NET Core Web API
.NET229 titlesDifferent approaches in ASP.NET Core Web API versioning
0
Some time ago I wrote an article about ASP.NET Core Web API versioning which describes route based Web API endpoint versioning. I love route versioning and to me it is the best way of versioning because it is pretty straight, but there are situations where this kind of versioning is not suitable.
On nuget.org you can find Microsoft.AspNetCore.Mvc.Versioning package which gives you more options on how you can version your Web API endpoints...read more
01
Jun
2018
Setting up .NET Core service/daemon on Debian Linux OS
.NET229 titlesHow to run .NET Core application as daemon on Linux
0
I found a lot of articles out here on this subject, but non of them actually made the daemon work from the first time. There was always some catch I had to chase and found in some other article posted online.
In this article I will try to cover as much as possible how to setup .NET Core daemon working on a clean Debian 9 Linux machine...read more
18
Feb
2018
Installing same Windows service under a different name
.NET229 titlesHow to install same Windows service with different name on the same host
0
Microsoft .NET framework comes with a really good support for Windows services. Regarding the project itself, Visual Studio IDE comes with build in project template for Windows service.
.NET framework itself comes with a built in tool installutil for deploying the Windows Service project...read more
20
Sep
2017
Clean stop of Windows Service in .NET
.NET229 titlesStop Windows Service in the proper manner in C#
0
The common reason I wrote Windows Services applications for are usually workers. For example, you need to read messages from the queue and process them...read more
30
Nov
2015
Short URL implementation with WebAPI
.NET229 titlesSimple URL shortening web service implementd with WebAPI
0
Today there are multiple URL shortening solution available online for free. However, there is always need to have some existing funtionalities in the house for various reasons...read more
19
Nov
2015
Debugging Windows Service application with console in C#
.NET229 titlesAn easier way to debug and develop Windows Services
0
Developing Windows Service might a a real headache since you do not have any visual part to see the output. Even if you want to rely on Visual Studio debugger you need to install the service, stop it (if already running), deploy, start the service from Windows MMC and finally hook up Visual Studio to the running service process...read more
22
Oct
2015
.NET managed scheduled task runner
.NET229 titlesScheduled managed code execution in .NET
0
Sometime ago I wrote an article about Windows Scheduled Task vs Windows Service where I compared and listed benefits and drawbacks of using scheduled tasks in Windows and Windows Services for executing certain operation which repeats in some time span. However idea of executing tasks in a single Windows Service is very useful if you need to execute task in a short time span plus you have a full control including logging and other fine grained customization in case you write the task in your code...read more
06
Oct
2015
MSMQ JSON message formatter
.NET229 titlesUse JSON to serialize and deserialize message queue messages
0
Storing objects in the message queue (MSMQ) is based on the serialization of the object instance using some of the serializes, basically any class the implements IMessageFormatter. Most commonly used ones are BinaryMessageFormatter and XmlMessageFormatter.
I prefer XmlMessageFormatter over BinaryMessageFormatter, mostly because messages are stored in a readable format inside the queue, so in case something goes wrong you can direly check the content of the message using built Computer Management MMC (Microsoft management console) in the.
...read more
08
Jul
2015
Changing service reference configuration in the runtine
.NET229 titlesUpdating service reference without restarting your applcation
0
Using web services in C# and in general in .NET based applications is really easy. All you need is a service URL and Visual Studio will generate both proxy classes for service communication and configuration for web service endpoints and bindings...read more
18
Jan
2015
Avoiding high processor load in long running loops
.NET229 titlesKeep processor not overloaded with long running loops
0
When having a long running loop which you are not sure when it is going to end you will probably have to create a loop in a separate loop and on every iterration you will check whether some condition is true and exit the loop.
Let's say you want to execute some piece of code after some specific time, let's say after one minute or everyday at specific time (common scenario in windows services). You can do it really simple with Timer class and just few lines of code as the code below.
...read more
26
Dec
2014
One way, fire and forget action in WCF
.NET229 titlesLong running process invoke from ASP.NET web application
0
In case you are building a web app that needs to perform some complex or long running task, for sure you would't want that task to slow down your website or web application.
For example you have a database of growing number of members on your website and you want to send a notification after you published some page on the website. Imagine you have 10,000+ members and that you are composing different message for each of them based on their account information and then sending an email with notification message.
...read more
09
Dec
2014
Windows Scheduled Task vs Windows Service
.NET229 titlesPoints to consider whether to use scheduled task or windows service
0
From time to time you have a need to implement some maintainance opration for your application server. Whether it is just a simple temporary file deleting pr something more complicated.
Two most common ways to do this are either using
...read more
.NET
5
Jun
2022
Using dotnet nuget package vulnerability scan in Azure DevOps build
Listing nuget vulnerabilities and controlling build in Azure DevOps
5
May
2022
Protecting static files in ASP.NET Core using custom middleware
Restricting access to specific static content with middleware in ASP.NET Core
20
Dec
2021
Supporting multiple authentication schemes in asp.net core webapi
Using more than one authentication schemes in webapi projects
12
Dec
2021
Controlling the flow of migrations in EF Core
Altering EF Core migrations execution order
28
Nov
2021
Unit of work pattern with Dapper
Implementing unit of work pattern with Dapper in .NET 5
21
Sep
2021
Adding display name to Enum values
Implementing additional values for Enum items in C#
JavaScript
28
Oct
2018
HTML5 localStorage with expiry with vanilla JavaScript
Using HTML5 localStorage with expiry
8
May
2018
Monitoring DOM changes with JavaScript
Handling DOM changes with plain JavaScript
9
May
2017
Non blocking CSS load on the page
Load external CSS files in an async manner
16
Mar
2017
Serialize html form to JSON without using JQuery
Transform user input from HTML form fields to JSON
17
Jan
2016
Copy text value to clipboard using jQuery
Simple sample of using jQuery to copy value to clipboard
11
Jan
2016
Resize image on the client side with JQuery
Reducing the upload sie by resizing image on the client side
SQL/T-SQL
22
Feb
2022
Select column names with values from SQL Server database
Fetching column names with its value in T-SQL using built in JSON methods
23
May
2020
Identifying opened connections for the specific application in SQL Server
Connection listing queries in SQL Server
3
May
2018
Reading JSON data in T-SQL on SQL Server
Extracting values from JSON string on SQL Server using T-SQL
28
Apr
2016
Create XML/HTML with T-SQL
Generating XML/HTML output in SQL Server
24
Nov
2015
IP address to octets split in TSQL
Split IP addresse into octets in SQL Server
20
Jul
2015
Getting first and last second of the current year, month and day
Using minimum and maximum date time in SQL query
Umbraco CMS
2
Mar
2018
Minify HTML output of your pages
Minification of HTML output using ASP.NET IHttpModule
18
Apr
2015
Generate sitemap.xml on the fly in Umbraco CMS
Simple sitemap.xml Umbraco handler
2
Mar
2015
Accessing UmbracoHelper in HttpHandler request
Working with UmbracoHelper and IPublishedContent in HttpHandler
14
Sep
2014
Same page language switching in Umbraco
Land on the same page in different language in Umbraco using Relations
4
Sep
2014
Getting cropped image the smart way
The way to get cropped image URL with option to load original image too
27
Aug
2014
Fastest way to return JSON result from a controller
Resturn JSON in MVC controller action