49 热度

ASP.NET Core IIS InProcess Hosting Issue in .NET Core 3.1

I ran into a nasty issue yesterday related to hosting an ASP.NET Core 3.1 server application in IIS using the default InProcess hosting. If you're not familiar with ASP.NET Core hosting in IIS, here is a previous post that provides more insight on the two hosting modes, how they work and how they di...

收录时间: 2020-01-16
分类: ASP.NET Core
贡献者: Rector
69 热度

Asp.Net Core下的开源任务调度平台ScheduleMaster—快速上手

概述ScheduleMaster是一个开源的分布式任务调度系统,它基于Asp.Net Core平台构建,支持跨平台多节点部署运行。它的项目主页在这里:https://github.com/hey-hoho/ScheduleMasterCore关于它的简单介绍可以看这里:https://www.cnblogs.com/hohoa/p/12162581.html本地部署使用前请准备好所需环境...

收录时间: 2020-01-15
分类: ASP.NET Core
贡献者: Rector
79 热度

避免在ASP.NET Core 3.0中为启动类注入服务

本篇是如何升级到ASP.NET Core 3.0系列文章的第二篇。Part 1 - 将.NET Standard 2.0类库转换为.NET Core 3.0类库Part 2 - IHostingEnvironment VS IHostEnvironent - .NET Core 3.0中的废弃类型Part 3 - 避免在ASP.NET Core 3.0中为启动类注入服务(本篇)...

收录时间: 2020-01-15
分类: ASP.NET Core
贡献者: Rector
34 热度

Create fake user for ASP.NET Core integration tests

After getting done with fake users for ASP.NET Core controller unit tests I wanted to make fake users available also in integration tests. It took some inventing and hacking but I made it work. This blog post shows you how to create fake users for ASP.NET Core integration tests and write effective extension methods to keep integration tests shorter.

收录时间: 2020-01-15
分类: ASP.NET Core
贡献者: Rector
29 热度

Logging MVC properties with Serilog.AspNetCore: Using Serilog.AspNetCore in ASP.NET Core 3.0 - Part 3

In my previous post I described how to configure Serilog's RequestLogging middleware to add additional properties (such as the request hostname or the selected endpoint name) to Serilog's request log summary. These properties are available from HttpContext so can be added directly by the middleware itself.

收录时间: 2020-01-15
分类: ASP.NET Core
贡献者: Rector
39 热度

[ASP.NET Core 3框架揭秘] Options[4]: Options模型[下篇]

IOptionsFactory解决了Options的创建与初始化问题,但由于它自身是无状态的,所以Options模型对Options对象实施缓存可以获得更好的性能。Options模型中针对Options对象的缓存由IOptionsMonitorCache对象来完成。Options模型之所以将表示缓存... ...

收录时间: 2020-01-14
分类: ASP.NET Core
贡献者: Rector
AD 友情赞助
36 热度

Blazor Full-Stack Web Dev in ASP .NET Core 3.1

This is the second of a new series of posts on ASP .NET Core 3.1 for 2020. In this series, we’ll cover 26 topics over a span of 26 weeks from January through June 2020, titled ASP .NET Core A-Z! To differentiate from the 2019 series, the 2020 series will mostly focus on a growing single codebase (NetLearner!) instead of new unrelated code snippets week.

收录时间: 2020-01-14
分类: ASP.NET Core
贡献者: Rector
36 热度

Create fake user for ASP.NET Core controller tests

I think most of ASP.NET Core applications have authentication enabled. When writing unit tests for controllers we have one set of tests that need authenticated user and other set of tests that need anonymous user. Faking User property of controller is a little bit tricky. This blog post shows how to do it.

收录时间: 2020-01-14
分类: ASP.NET Core
贡献者: Rector
33 热度

Introducing Identity to the ASP.NET Core Project

In this article, we are going to learn about ASP.NET Core Identity implementation in the ASP.NET Core project.ASP.NET Core Identity is the membership system for web applications that includes membership, login and user data.But, it is not just a user store, it is much more than that.Instead of being...

收录时间: 2020-01-14
分类: ASP.NET Core
贡献者: Rector
35 热度

ASP.Net Core 3 – pass parameters to actions

Passing parameters to actions is an essential part of building RESTful Web API. .Net Core offers multiple ways to pass parameters to methods, that represent your endpoints. Let’s see what they are.

收录时间: 2020-01-14
分类: ASP.NET Core
贡献者: Rector
57 热度

How to integrate AutoMapper in ASP.NET Core Web API

In this article, we are going to see how to integrate AutoMapper in ASP.NET Core Web API. First, we will see what the heck is AutoMapper and which problem it solves. After that, we will integrate it with Web API and then we will take a look at commonly used features of AutoMapper. So let's grab the cup of coffee and start learning.

收录时间: 2020-01-13
分类: ASP.NET Core
贡献者: Rector
41 热度

Using Google Cloud Storage in ASP.Net Core

In this post, I will show how to use Google Cloud Storage (GCS) to store and serve images of an ASP.NET Core web application.

收录时间: 2020-01-13
分类: ASP.NET Core
贡献者: Rector
39 热度

Migration from ASP.NET Core 3.0 to 3.1

On December 3rd .NET Core 3.1 was released which included a new release of ASP.NET Core 3.1 and Entity Framework Core 3.1. This post is going to walk through updating the Contacts API project from the refreshed ASP.NET Basics series. All the changes I made came from Microsoft’s Migrate from ASP.NET Core 3.0 to 3.1 doc.

收录时间: 2020-01-13
分类: ASP.NET Core
贡献者: Rector
59 热度

ASP.Net Core 3.1 中使用JWT认证

JWT认证简单介绍关于Jwt的介绍网上很多,此处不在赘述,我们主要看看jwt的结构。JWT主要由三部分组成,如下:HEADER.PAYLOAD.SIGNATUREHEADER包含token的元数据,主要是加密算法,和签名的类型,如下面的信息,说明了加密的对象类型是JWT,加密算法是HMAC SHA-256...

收录时间: 2020-01-11
分类: ASP.NET Core
贡献者: Rector
65 热度

Asp.Net Core下的开源任务调度平台ScheduleMaster

从何说起2017年初的时候,由于当时项目需要做了一个乞丐版定时调度系统,那时候只在单机上实现了核心的调度功能。做这个玩意之前也调研了社区中开源的解决方案,找了几个实地部署试跑了一下,其实都很不错。但那时候我们有个问题就是应用都是基于Azure WebApp去部署,不太想为了这个东西搞一台虚拟机来跑windows服务,所以最后决定重新开发一个,哪怕功能简单点能满足需要就行。很快这个东西就做好了也投入了使用,因为是给业务系统定制那里面多少掺杂一些业务上的东西,那时候我就有了一个想法:把它剥离处理做成一个比较通用的系统打造成自己的开源项目。后来又对它做了一些升级优化,支持了多节点运行,做了一些界面展...

收录时间: 2020-01-10
分类: ASP.NET Core
贡献者: Rector
AD 友情赞助
45 热度

DataSet and DataTable based ad-hoc reporting with ASP.NET Core

In one of my projects I have some ASP.NET Core views that display multiple tables with reporting data. Data comes from SQL Server views and stored procedures and these can be modified in database without deploying application to server again. I came out with very common solution in ASP.NET Core to solve this problem using raw SQL commands and shared views for DataTable and DataSet. Here’s what I did.

收录时间: 2020-01-09
分类: ASP.NET Core
贡献者: Rector
40 热度

Razor Pages Localisation - SEO-friendly URLs

This is the fourth article in a series that explores various aspects of localisation in ASP.NET Core Razor Pages applications. This article concentrates on the SEO aspects of localisation as they pertain to URL management, and how to utilise the RouteDataRequestCultureProvider to help you manage that.

收录时间: 2020-01-08
分类: ASP.NET Core
贡献者: Rector
54 热度

Data Shaping in ASP.NET Core Web API

In this article, we are going to talk about a neat concept called data shaping and how to implement it in ASP.NET Core Web API. To achieve that, we are going to use similar tools as we did in the sorting article. Data shaping is not something that every API needs, but it can be very useful in some c...

收录时间: 2020-01-08
分类: ASP.NET Core
贡献者: Rector
45 热度

Logging the selected Endpoint Name with Serilog: Using Serilog.AspNetCore in ASP.NET Core 3.0 - Part 2

In this post I show how you can add additional metadata to Serilog's summary request log, such as the Request's hostname, the Response's content-type, or the selected Endpoint Name from the endpoint routing middleware used in ASP.NET Core 3.0.

收录时间: 2020-01-08
分类: ASP.NET Core
贡献者: Rector
45 热度

Authentication & Authorization in ASP .NET Core 3.1

This is the first of a new series of posts on ASP .NET Core 3.1 for 2020. In this series, we’ll cover 26 topics over a span of 26 weeks from January through June 2020, titled ASP .NET Core A-Z! To differentiate from the 2019 series, the 2020 series will mostly focus on a growing single codebase (NetLearner!) instead of new unrelated code snippets week.

收录时间: 2020-01-07
分类: ASP.NET Core
贡献者: Rector
AD 友情赞助