This site uses cookies to deliver our services. By using this site, you acknowledge that you have read and understand our Cookie and Privacy policy. Your use of Kontext website is subject to this policy. Allow Cookies and Dismiss

Programming

About Microsoft.NET, C#/VB/C++, WPF/WCF/WinForm/Silverlight, Windows Azure, SQL Server, Windows Phone, etc.

Subscribe

c#

Tuples in C# (4.x, 7.0, 7.1)

194 views   0 comments last modified about 9 months ago

What is a tuple? Tuple is an ordered sequence, fixed-size, immutable and of heterogeneous objects. Tuple has been existing in other languages such as F#, Python, Perl and etc. for a long time. It was first introduced into C# from C# 4.0 and has been evolving over time. Since C# 7.1, tuple...

View detail
c# lite-log

C# version history and core features

149 views   0 comments last modified about 9 months ago

C# is my favourite programming language and has been evolving overtime. I have been programming with many other languages but C# is always my favourite because it is simple and easy to use. Visual Studio is the most powerful tool I’ve ever used. To me, programming efficiency and peformance are th...

View detail
lite-log hadoop hdfs

Invoke Hadoop WebHDFS APIs in .NET Core

424 views   0 comments last modified about 9 months ago

Background Apache doesn't provide native official .NET APIs for Hadoop HDFS. The HTTP REST API supports the complete FileSystem / ...

View detail
.net core

Logging configuration in .NET core

938 views   0 comments last modified about 2 years ago

.NET core introduces a logging API that works with a number of logging frameworks. The built-in providers are configurable and extensible to support different level loggings.

View detail
.net core

Sending Emails in .NET Core Applications

1631 views   0 comments last modified about 2 years ago

Sending emails are common in applications. For example, when user registers, we need to send account activation emails. This post summarize the approaches we can use to send emails in .NET Core 1.x and 2.x.

View detail
dotnet core asp.net core

Retrieve Http client request metadata like IP address and languages in asp.net core

1713 views   0 comments last modified about 2 years ago

IP Address In ASP.NET Core, Request.UserHostAddress has been removed though that attribute exists in the traditional ASP.NET applications. We can use HttpContext.Connection to retrieve the remove client IP address: var ipAddress = HttpContext.Connecti...

View detail
asp.net core identity core 2

Retrieve Identity username, email and other information in ASP.NET Core

3381 views   0 comments last modified about 2 years ago

The identity system in ASP.NET has evolved over time. If you are using ASP.NET Core, you probably found User property is an instance of ClaimsPrincipal in Controller or Razor views. Thus to retrieve the information, you need to utilize the claims.

View detail
.net core azure

Retrieve Azure AppSettings and Connection String Settings in ASP.NET Core Apps

2491 views   0 comments last modified about 2 years ago

In ASP.NET Core, we can easily use user secrets to manage our password or credentials. This post will summarize the approaches we can use after the websites are deployed into Azure.

View detail
asp.net core 2

Server.MapPath Equivalent in ASP.NET Core 2

7141 views   0 comments last modified about 2 years ago

In traditional asp.net applications, Server.MapPath is commonly used to generate absolute path in the web server. However, this has been removed from ASP.NET Core. So what is the equivalent way of doing it?

View detail

Migrating from ASP.NET Core 1.x to ASP.NET Core 2.0

1432 views   2 comments last modified about 2 years ago

Migrating from ASP.NET Core 1.x to 2.0 is not an easy job especially if you have customized Identity and used customized authentication. This post summarizes the issues and errors I have experienced and their resolutions when upgrading my project. Hopefully it can save you sometime if you are doi...

View detail