
Image from Pexels
Tagged articles - WebAPI
Found 19 articles tagged with WebAPI
20
Dec
2021
Supporting multiple authentication schemes in asp.net core webapi
.NET229 titlesUsing more than one authentication schemes in webapi projects
0
Is is not so often than you have to use more than one authentication schemes in your project, but there are some corner cases when you have to do so. One of it is a scenario where you are supporting some weaker authentication schema like basic http authentication where credentials are supplied pretty much on every request.
This kind of loosen security schema is to some limited extend suitable for internal APIs meaning that no other than users or most likely application within your organization network will access...read more
04
Sep
2019
Mixed model binding in ASP.NET Core using custom model binders
.NET229 titlesIModelBinder interface implementations usage for multiple source model binding
0
Patterns, conventions and standards are invented and enforced in order to make coding easier and more understandable for the developers, but in some cases certain patterns and conventions do not couple so easily and you have to rely on more on the actual technology you are using in order to overcome these complications. One of the cases this happens is using CQRS, especially commands and REST...read more
31
Aug
2019
Handling file uploads in Swagger UI with ASP.NET Core
.NET229 titlesSwagger UI file upload in ASP.NET Core WebApi
0
Swagger is the most convenient way to document your REST api endpoints. It provides generating of documentation on the fly based on the code structure, which shortens the time of creating the documentation drastically...read more
19
May
2019
Automatic CQRS handler registration in ASP.NET Core with reflection
.NET229 titlesRegistering all query and command handlers in your CQRS implementation in ASP.NET Core
0
Command Query Responsibility Segregation (CQRS) pattern is one of my favorite way of handling the Web API requests for a simple reason that is clearly separates reading and writing. Quite often at some stage of the project you will hit the performance bottlenecks which are most probably cause by the way you are reading ow writing your data.
CQRS splits reading and writing so that you can independently use different persistence framework for reading and writing...read more
16
Apr
2019
Localization of the DTOs in a separate assembly in ASP.NET Core
.NET229 titlesLocalizing validation messages in ASP.NET Core WebAPI
0
Since REST services do not have the UI, there is not much space for the localization. Data is sent and retrieved and most of the decisions is made based on the status code of the response...read more
14
Apr
2019
Displaying Azure DevOps build number in Swagger UI for ASP.NET Core
.NET229 titlesHow to add and show Azure DevOps build number in ASP.NET Core project and Swagger UI
0
Swagger is a great way to document you REST API endpoints and reduce the need for communication, item spent and the cost for supporting the consumers of you APIs. Apart from providing the info about the endpoints, models, validation it can also display the data of the product...read more
08
Apr
2019
Why you should not use Authorize attributes to protect your API endpoints
.NET229 titlesProtecting ASP.NET Core WebAPI without using Authorize attribute
0
Authentication is an essential component of pretty much any REST API. Most of the resources you expose through REST API services, unless they are protected inside intranet, need to be protected by some kind of authentication.
This is pretty much clear and it is easy achieved by just simply decorating your controller actions or even whole controllers with Authorize or AllowAnonymous attributes. ...read more
26
Mar
2019
DTO comments from external assembly in Swagger documentation in ASP.NET Core
.NET229 titlesInvolving contract classes documentation from separate assemblies to Swagger
0
Contracts, models or DTOs, call them how ever you want, are your connection with the outside world from your REST API. Consumers of your API depend on them and they know what to expect or what your API endpoints expect in communication...read more
23
Mar
2019
Partial update with PATCH using DTOs and AutoMapper in REST WebApi
.NET229 titlesHow to partially update an entity in REST WebApi services with ASP.NET Core
0
Implementing partial updates on the REST API is probably the trickiest method to implement. Unlike PUT HTTP method where you pass the whole DTO when you are updating an entity, PATCH method is intended to update only one or few properties of the entity you want to apply change to...read more
15
Dec
2018
The best option to use for a return type in ASP.NET Core WebAPI controller
.NET229 titlesChoosing the proper return type for WebApi controller actions
0
Starting from .NET Core version 2.1, there are so far three types of WebApi responses that controller actions can return. All three types had it's own pros and cons but all are lacking in options to satisfy both REST and the high level of testability. The available response types in ASP.NET Core including recently released 2.2 version are
...read more
11
Nov
2018
Handling data concurrency in EF Core and ASP.NET Core WebAPI
.NET229 titlesData concurrency in Entity Framework Core
0
Entity Framework Core implements optimistic concurrency strategy which is opposite to pessimistic concurrency strategy. Lets's first clear out what are main differences between these two approaches in concurrency control.
Optimistic concurrency control allows multiple processes to access and modify data without any explicit lock on the data...read more
04
Nov
2018
Setting up Swagger to support versioned API endpoints in ASP.NET Core
.NET229 titlesAdding Swagger support for versioned REST Web API endpoints
0
Versioning of your endpoints is important especially if you have 3rd party dependent clients of your REST API service. Any change in your endpoint, for example in data structure may impact clients even if it is backward compatible, clients may process your endpoint data in different ways, so even adding one additional property to your model may also impact functionality of the client which is consuming your endpoint.
Prerequisites
...read more
16
Sep
2018
Using custom request and response serializers in ASP.NET Core
.NET229 titlesConfiguring 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
04
Aug
2018
Simple pixel conversion tracking implementation in ASP.NET Core WebApi
.NET229 titlesConversion tracking implementation using pixel method in ASP.NET Core
0
Pixel tracking, although it is the oldest method for tracking conversions in marketing, it is still used widely and some big companies like Facebook are still overing it as one of the methods for tracking the conversions of on your web pages. Tracking conversion via pixel method is still widely used because of it's simplicity...read more
06
Jul
2018
How to get client IP Address in ASP.NET Core 2
.NET229 titles Fetching client IP address in ASP.NET Core
0
As ASP.NET was evolving, there were different ways accessing client IP address from the request. The way to do it WebForms and MVC Web application is simply accessing request of the current HTTP context
...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