Tagged articles - .NET

Found 94 articles tagged with .NET

Using custom request and response serializers in ASP.NET Core
Configuring input and output serailzer/deserialier in ASP.NET Core pipeline
0
This is not a new subject and the support for handling WebApi input and output was introduced in .NET Core 2.0 and it's been there since then. There are couple of useful pages out there and it is even well documented on Microsoft official page Custom formatters in ASP.NET Core Web API... read more
Setting up .NET Core development environment on Ubuntu Linux
A quick guide for switching from Windows based Visual Studio 2017 to Visual Studio Code
0
With growing popularity of dotnet Core, Git and Docker, developers who used to work mainly on Windows are now getting used to CLI environment and obviously Linux. Windows is still a development environment platform of choice, bit since Microsoft already developed and published Visual Studio Code as a cross platform IDE for Windows, Linux and Mac. Although it is still not mature as Visual Studio 2017, it is a decent tool for .NET Core applications development... read more
Reloading the cache automatically once expired is ASP.NET MVC
Load values to in memory cache as soon as they expire in ASP.NET MVC
0
In memory caching is not a bullet proof way of caching data in an application, especially if this application is distributed. The lack of synchronization between nodes can cause you application to misbehave showing wrong data or even throwing exceptions and crashing. This is one of the main reasons why distributed caching is the best way of doing the caching in your web application. But not all applications you might be developing need to run as distributed on multiple machines... read more
Get most visited pages of your website from Google Analytics using C#
List most visited website pages from Google analytics in your .NET application code
0
If you have a website like this one with articles and you would like to suggest most visited articles to your visitors, there are few ways to do this. One of them is definitely a custom solution that can track and store count of every visit per page you have, or without any re-inventing of wheel you can just hook to Google Analytics API to pull the data... read more
Creating Windows service and Linux daemon with the same code base in .NET
Cross-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
Limit number of tasks running at the same time in .NET
How to throttle number of running tasks to a specific number in C#
0
Limiting the number concurrently running Tasks is not that often requirement in a code, but eventually you'll find yourself in the situation that for the most likely performance issues you'll have to limit number of concurrently running Tasks. One of these situations is when you have long running operations in the Task. If you spin up to many Tasks you will seriously degrade your application performance... read more
Request Filtering in ASP.NET Core using Middleware and request pipeline
Filter requests in ASP.NET Core application through request pipeline configuration
 
0
ASP.NET Core comes with advanced request processing thrugh pipepline configuretion of the .NET Core middleware elements. You can easily specify the steps that will be exscuted on the request object all the way until the response is returned back... read more
How to boost application performance by choosing the right serialization
Improving performance of .NET application with different serialization formats
0
Pretty much any serious application now days needs to interact with any storage media such as disk or network. This is where serialization comes in... read more
Setting up .NET Core service/daemon on Debian Linux OS
How 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
Using Google reCAPTCHA v2 in ASP.NET Core Web Application
Validating data with Google reCAPTCHA v2 in ASP.NET Core using custom validation attribute
0
In case you have any page on your website which allows anonymous users to POST data to your web application, you should always use any kind of bot protection. Usually that is any kind of CAPTCHA implementation... read more
Redis health check in ASP.NET Core WebApi
Checking availability of distributed Redis cache instances in ASP.NET Core WebApi
0
Even before popularity of micro service approach, for even monolithic applications you needed to have health-checks (Google Compute Engine) or health-probes (Microsoft Azure) for load balancing. Basically in load balancing scenario, these endpoints are used to tell load balancer whether instance can handle requests or not. Since handling of requests may consider several components, these endpoints either return 200 OK HTTP response or any other response like 500 Internal Server Error with optional payload message describing the issue and each component status. ... read more
Seeding data in Entity Framework Core from Visual Studio
Insert sample data from Visual Studio IDE with EF core
 
0
Unlike Entity Framework 6, EF Core and whole .NET Core relies on dependency injection. For example, configuration is expected to be injected from the calling assembly instead of being available at any time. This is one of the reasons Migrations in Code First approach do not work out of the box for EF Core... read more
Error handling in ASP.NET Core Web API
Generating the proper response for exceptions in ASP.NET Core WepApi
0
Both Web API in .NET 4.5 and later and Web API in ASP.NET CORE have great error handling support out of the box. You can specify you global handler and control your response to a client when exception happens. ... read more
SETNX with TTL in .NET using StackExchange.Redis
Set key if it does not exist in redis with expiry using StackExchange.Redis
0
Recently I needed to set redis key if it is not present with specific expiry time to use it as some logical flag. I knew tat you can use SETNX command for this but did not have any info how to set the expiry time. After some time going through redis documentation and articles found online I found a SET method overload for the redis-cli. ... read more
Generic string to primitive type converter in C#
Converting string data to any primitive type in .NET and .NET Core
0
Often case when you need to convert String to a different type which is most of the time a primitive type in C# is when you are reading values from configuration. In both .NET and .NET Core, reading from configuration return plain String value... read more

.NET

read more

JavaScript

read more

SQL/T-SQL

read more

Umbraco CMS

read more