Category:ASP.NET

  • Detailed explanation ASP.NET Principle of core endpoint routing

    Time:2021-3-4

    Endpoint routing first appeared in the Internet ASP.NET Core2.2, in ASP.NET Core3.0 was promoted to first class citizen. Motivation of endpoint routing Before the emergence of endpoint routing, we usually define MVC middleware resolution routing at the end of the request processing pipeline. This means that in the processing pipeline, the middleware before MVC middleware […]

  • . net core add area code instance analysis

    Time:2021-3-3

    1、 As shown in the figure below 2、 Build a good framework and delete unnecessary packages 3、 Add route app.UseEndpoints(endpoints => { endpoints.MapControllerRoute( name: “default”, pattern: “{controller=Home}/{action=Index}/{id?}”); endpoints.MapAreaControllerRoute( name: “areas”, “areas”, pattern: “{area:exists}/{controller=Home}/{action=Index}/{id?}”); }); 4、 Add controller using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; namespace NLD.HouTai.Areas.Api.Controllers { [ApiController] [Area(“API”)] [Route(“API/[controller]/[action]”)] […]

  • How to deploy. Net core 3.1 on alicloud functional computing

    Time:2021-3-2

    When deploying applications using alicloud ECS or other common VPS services, you need to manually configure the environment, monitor the behavior of ECs, and make patches, which is a bit complicated. Fortunately, many cloud vendors (Alibaba cloud, azure, etc.) provide serverless services. With the help of serverless, developers can focus more on code development and […]

  • Learn more about. Net framework

    Time:2021-2-27

    1、 CLR integrates many languages, and they can access each other because of the standard type set, metadata and common execution environment established by CLR. Because there are great differences among different languages, such as case sensitivity, some don’t support unsigned, operator overloading or variable parameter methods, so if you want to create a program […]

  • Log4 net.config Summary of common methods for enabling configuration

    Time:2021-2-26

    In the above, a simple log4 configuration is built, and the log4net configuration is enabled in the actual operation. Here is a summary. Method 1: The code is as follows: class Program { private readonly static ILog log = InitILog(); //private readonly static ILog log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public static void Main(string[] args) { var gp=log4net.LogManager.GetRepository().Configured; […]

  • . net core + nginx to realize the whole steps of project load balancing

    Time:2021-2-25

    If you haven’t used nginx, you should have heard of it more or less. Deployment of Vue, reverse proxy and load balancing can help you. Today, let’s talk about our project of nginx load balancing, as shown in the figure below. When the request arrives at nginx, nginx will forward it for us. First use […]

  • Talking about AjaxPro.dll , asp.net Foreground JS calls background method

    Time:2021-2-24

    1. What is Ajax AJAX is the abbreviation of asynchronous JavaScript and XML. The inventor of the term “Ajax” is Jesse James Garrett, while Google promotes and makes Ajax technology hot. The core idea of AJAX is to use the XMLHttpRequest object to send asynchronous requests. 2. Why use it Ajax lightens the burden on […]

  • On serialization and deserialization in. Net

    Time:2021-2-23

    Serialization and deserialization are often heard and used by all of us. However, some people may not know why. Net has such a thing and how. Net frameword can implement such a mechanism for us. Here I also briefly talk about my understanding of serialization and deserialization. 1、 What is serialization and deserialization Serialization is […]

  • ASP.NET Introduction to the method of complex request cross domain setting in webapi 2

    Time:2021-2-22

    ASP.Net The cross domain setting of the core is relatively simple. For details, please refer to the official documents of Microsoft https://docs.microsoft.com/zh-cn/aspnet/core/security/cors?view=aspnetcore-3.1#ecors Cross domain condition Cross domain refers to the HTTP requests initiated by the current resource when accessing other resources. Due to security reasons (due to the same origin policy, if only one of […]

  • How to use element navmenu navigation menu

    Time:2021-2-21

    Components – navigation menu Top bar <el-menu :default-active=”activeIndex” mode=”horizontal” @select=”handleSelect”> < El menu item index = “1” > processing center < / El menu item > <el-submenu index=”2″> < template slot = “title” > My workbench < / template > < El menu item index = “2-1” > option 1 < / El menu item […]

  • How to use. Net core httpclient

    Time:2021-2-19

    preface Since the birth of httpclient, its usage has been controversial. In the era of framework, there have been quite a number of classic misuse cases, including TCP link exhaustion, DNS change imperceptibility and so on. Interested students to find their own research. In. Net core version, ihttpclientfactory is provided to create httpclient to solve […]

  • Inverse solution of objectid in. Net core

    Time:2021-2-18

    preface When designing a database, we usually need to assign a primary key to the business data table. In many cases, in order to save trouble, I use the guidguuid directly. However, in monggodb, objectid (hereinafter referred to as OID) is implemented internally. The implementation of the source code is given in the driver of. […]