Tagged pages

Found 10 articles tagged with Service

Clean stop of Windows Service in .NET
Stop 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
Short URL implementation with WebAPI
Simple 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
Debugging Windows Service application with console in C#
An 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
.NET managed scheduled task runner
Scheduled 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
MSMQ JSON message formatter
Use 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
Authentication via headers
Simple Web API authentication using request headers
 
0
Authentication in web services is a bit more different than with web pages because of one simple reason. There is no UI for entering credentials to authenticate to consume service... read more
Changing service reference configuration in the runtine
Updating 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
Avoiding high processor load in long running loops
Keep 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
One way, fire and forget action in WCF
Long 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
Windows Scheduled Task vs Windows Service
Points 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