
Image from Pexels
Tagged articles - WEB API
Found 25 articles tagged with WEB API
05
Jun
2019
Stop writing clients in C# for your Web APIs
.NET219 titlesAuto generating client libraries and packages for Web API using NSwag and Azure DevOps
0
Times of writing your HttpClient setup to call REST API endpoint are over. It is just to much of repetitive code and taking care of the endpoints of the REST API service...read more
03
Jan
2019
Filtering and paging collection result in ASP.NET Core Web API
.NET219 titlesPaging response data in ASP.NET Core WebApi projects
0
Paging a REST API response is equally important as filtering the data returned through REST API endpoints and they quite often come together. Just like filtering, paging limits the amount of data returned from the endpoint, saving both client and server side resources...read more
06
Jul
2018
How to get client IP Address in ASP.NET Core 2
.NET219 titlesFetching 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
13
Jun
2018
Advanced versioning in ASP.NET Core Web API
.NET219 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
23
May
2018
Redis health check in ASP.NET Core WebApi
.NET219 titlesChecking 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
07
Apr
2018
Simple implementation of ASP.NET Web API Basic authentication security
.NET219 titlesSecuring Web API with simple basic authentication and consuming it from the client code
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
25
Feb
2018
Send data to Azure Log Analytics from C# code
.NET219 titlesSending data to Azure Log Analytics from your C# code
0
Azure as a part of Microsoft Operations Management Suite provides data collection and insight services inside Azure cloud platform.
It allows you to:
...read more
24
Feb
2018
Multiple file upload with ASP.NET WebApi
.NET219 titlesUpload multiple files using WebApi REST service
0
Taking out business logic from the application allows different clients running on a different platform to use same logic. REST API is a great way to decuple business logic and make it available to different clients on a different platforms. To upload files using WebApi we first need to define an action in a WebApi controller to handle files posted to the endpoint.
...read more
12
Sep
2017
Posting JSON to WebApi without reference to a model in C#
.NET219 titlesPost JSON data to WebApi without having new model class on the client
0
Web API and in general REST services are becoming more and more often used layer of the applications. It relies on the HTTP, it is lighter than the SOAP and more natural to JavaScript, therefore easy to use both from the client and serer side.
Implementation of the WebApi in ASP.NET is pretty simple...read more
12
May
2017
ASP.NET Core Web API versioning
.NET219 titlesSimple way to setup versioning in ASP.NET Core WebAPI
0
When it comes to WebAPI many project overlook the versioning aspect. The whole concept of WebAPI is to serve multiple types of clients which can be based on different platforms, run on different devices etc...read more
18
Jan
2017
Why is JsonRequestBehavior needed?
.NET219 titlesUnderstanding JSON data restriction over HTTP GET requests
0
You probably run to this exception when you tried to fetch JSON data over HTTP GET request. Now, first this is easy to bypass by simply adding JsonRequestBehavior.AllowGet option to method which is retutning JSON data for GET request in a controller file.
...read more
30
Nov
2015
Short URL implementation with WebAPI
.NET219 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.
This functionality can be easily achieved with different approaches...read more
30
Oct
2015
IP address filtering from C# code in ASP.NET MVC and Web Api
.NET219 titlesRestrict or allow specific IP addresses to access your WebApi or MVC
0
Last year I wrote an article about IP address filtering on MVC and WebApi Restrict Access to an MVC Action or Controller based on IP address. Over time the requirements for IP filtering in several web based application increased, so I had t work on this class to make it more extendible and reusable in different scenarios.
The new scenarios I wanted to cover are:
...read more
22
Mar
2015
Enabling CORS only for specific domains in ASP.NET
.NET219 titlesEnable cross origin resquests only for certain domains in ASP.NET
0
Cross-origin resource sharing (CORS) means that page from other domain can make request to some resource which is on other domain. For example, if you try to invoke some WEB API method which is running on different domain you will get exception in the script.
By default CORS are disabled in ASP.NET bot you can easily enable them just by modifying web.config for IIS7 and newer versions pf IIS.
...read more
03
Sep
2014
Single file deployment concept in ASP.NET with WebAPI
.NET219 titlesDeployment contained in single file using WebAPI
0
As much as this sound new to you, it actually isn't.
If you worked on any Windows From application in .NET you had an option to embedded files in your form like images, icons and even sounds and videos. This made deployment a lot easier because you only have to deploy one .exe file.
...read more
.NET
26
Mar
2021
Generic type controller methods in ASP.NET Core
Using generic type controller methods in ASP.NET Core with Swagger
17
Jan
2021
Mocking view mapped DbSets with XUnit in EF Core
Writing unit tests for view bounded entities in EF Core
19
Dec
2020
Setting up SQL Server IDistributedCache with migration in ASP.NET Core
Embedding SQL Server caching in a project with EFCore migration
11
Dec
2020
Representing available string values for parameters as list in Swagger ASP.NET Core
Valid values as list in Swagger UI in ASP.NET Core
24
Nov
2020
Running multiple queries at the same time in EF Core
Overcoming the limitation of EF Core query execution
17
Nov
2020
Accessing multiple databases from the same DbContext in EF Core
Multiple database access from the same DbContext in Entity Framework Core 5
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
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
13
Apr
2015
Dealing with duplicate rows in SQL Server
Finding and cleaning up duplicate rows in SQL Server tables
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