Programming

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

Subscribe

dotnet core asp.net core

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

550 views   0 comments last modified about 8 months 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

411 views   0 comments last modified about 8 months 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

799 views   0 comments last modified about 8 months 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

2717 views   0 comments last modified about 8 months 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

746 views   2 comments last modified about 9 months 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

OpenIddict Refresh Token Flow issue ASP.NET Core 2.0

855 views   0 comments last modified about 9 months ago

Context When I followed OpenIDDict refresh flow sample, I constantly got the issue “The refresh token is no longer valid”, which is returned by the following code in my authorization web api controller: result.Content = new OpenIdConnectResponse  &...

View detail

Migrating from ASP.NET Core 1.x to ASP.NET Core 2.0 – Issues Continued

597 views   0 comments last modified about 9 months ago

Other related issues are found during my migration. Unable to Change Identity Table Names ...

View detail
dotnet core

[Link] Build SPA on ASP.NET Core with JavaScript Services

376 views   0 comments last modified about 2 years ago

Great introduction about JavaScriptServices ( JavaScriptServices GitHub repository ): Microsoft.AspNetCore.SpaTemplates plugs into dotnet new , providing project templates for Angular 2, Aurelia, Knockout...

View detail
.net asp.net dotnet core asp.net core 2

Migrate ASP.NET Core Projects – VS2015 to VS2017 and TFS2015 to TFS2017 Issues and Fixes

360 views   0 comments last modified about 2 years ago

Context Before Visual Studio 2017 was released, I was implementing my ASP.NET Core project using VS2015. TFS2015 is used for Continuous Build and Deployment for my projects. After migrating to VS2017, there are couple of issues I encountered in my environment: VS2017 has ...

View detail
dotnet core

dotnet.exe : No executable found matching command "dotnet-publish-iis"

781 views   0 comments last modified about 2 years ago

When upgrading from .net core 1.0 to 1.1, you may encounter the following error when running dotnet publish command: dotnet.exe : No executable found matching command "dotnet-publish-iis" The resolution is simple: adding the following line into the project.json file. At moment, the la...

View detail