
Image from Pexels
Tagged articles - ASP.NET Core
Found 58 articles tagged with ASP.NET Core
21
Jun
2018
Token based authentication and Identity framework in ASP.NET Core - Part 3
.NET229 titlesSetting up asymmetric key token based authentication in ASP.NET Core application on top of Identity Framework
0
Recently I wrote about setting up .NET Core Identity Framework and Token based authentication in ASP.NET Core using symmetric key signing. The downside of this approach is that both identity and resource server share the same key for signing and validating the token...read more
20
Jun
2018
Token based authentication and Identity framework in ASP.NET Core - Part 2
.NET229 titlesSetting up token based authentication in ASP.NET Core application on top of Identity Framework
0
In article Token based authentication and Identity framework in ASP.NET Core - Part 1 I described how to setup identity library for storing user accounts. Now we are going to setup ASP.NET Core Web API project to issue the token for authenticated users so they can access protected resources.
Identity Web API instance will be separated from from the resource Web API, so we'll have eventually two and possibly in future more resource services which will all use single identity server fr authentication and issuing access tokens.
...read more
20
Jun
2018
Token based authentication and Identity framework in ASP.NET Core - Part 1
.NET229 titlesSetting up Identity Framework in ASP.NET Core application
0
In ASP.NET Core identity framework is introduced as a membership provider making user management, authentication and authorization. It is built on to Entity Framework Core ORM which allows you to be storage type independent...read more
17
Jun
2018
Sending email in ASP.NET Core using SmtpClient and dependency injection
.NET229 titlesUsing dependency injection to send email in ASP.NET Core
0
Starting with .NET Core 2.0, Microsoft introduced SmtpClient, identical implementation as in .NET 4. This made sending emails from the application a lot easier as there is functionality out of the box and you do not have to rely on the 3rd party nuget packages.
If you inspect this class, you will see that the only interface it inherits is IDisposable, so it does not give you many options for injection unless you wrap it with your own implementation and interface, but since we are not going to go that deep into the dependency injection, we'll just focus on creating a client instance using .NET Core dependency injection framework.
...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
13
Jun
2018
Use different configuration based on environment value in ASP.NET Core
.NET229 titlesDifferent configuration per environment in ASP.NET Core
0
In .NET framework, having separate configuration is possible by having different web.config or app.config file transformations since in .NET framework configuration is stored in XML format. You can check more on this in article Separate configuration files per build config in Visual Studio IDE...read more
05
Jun
2018
How to setup ASP.NET Core run on Debian Linux with Nginx
.NET229 titlesHosting and running ASP.NET Core project on linux
0
In two previous articles (How to setup .NET Core 2 on Debian or Ubuntu Linux distro the easy way & Setting up .NET Core service/daemon on Debian Linux OS) I explained how to setup and run .NET Core based applications and how to run them as a Linux daemon. In this article we are going to take it one step further...read more
30
May
2018
How to setup .NET Core 2 on Debian or Ubuntu Linux distro the easy way
.NET229 titlesInstalling .NET Core on Linux the short way
0
Many of you who had chance to work docker and .NET Cote on Linux will agree that easiest way of running .NET Core on Linux is to pull microsoft/aspnetcore:2.0 image from docker repository and just setup your app with .Dockerfile.
You will be saved of the hassle of setting up the environment and .NET Core on on the Linux machine. But what if that is not an option? What if you really need for some reason to run your application on the specific host and not in the container?
...read more
29
May
2018
Google Invisible reCAPTCHA and reCAPTCHA v2 in ASP.NET Core
.NET229 titlesASP.NET Core implementation of Google reCAPTCHA and reCAPTCHA v2
0
Recently I wrote and article about setting up and using Google reCAPTCHA v2, better known as "I'm not a robot" validation. If you were setting up reCAPTCHA v2, you probably noticed that there is an option for "Invisible reCAPTCHA" option.
This type of validation, instead of asking user to interact with the UI in order to be identified as a human, does not require any direct interaction which can help building better user experience for your visitors...read more
24
May
2018
Using Google reCAPTCHA v2 in ASP.NET Core Web Application
.NET229 titlesValidating 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
23
May
2018
Redis health check in ASP.NET Core WebApi
.NET229 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
15
May
2018
Error handling in ASP.NET Core Web API
.NET229 titlesGenerating 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
02
May
2018
Generic string to primitive type converter in C#
.NET229 titlesConverting 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
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