Tag:2.0

  • ASP.NET Core 2 Alipay scan code payment implementation code

    Time:2021-4-15

    preface Since Microsoft replaced its CEO, its strategic direction has changed a lot. It is no longer so closed. It has opened many things, embraced the open source community, realized cross platform by. Net, acquired xamarin and provided it to developers for free, etc. I like. Net very much and hope. Net core can rise. […]

  • Using VBS to determine whether the computer has USB 2.0 port code

    Time:2021-4-13

    Q:Hello, script expert! Is there a way to use scripts to determine whether the computer has a USB ﹣ 2.0 ﹣ port?— RD A:Hello, Rd. Are you familiar with the movie “Freaky Friday”, in which mother and daughter exchange bodies (and roles)? Well, there’s something like crazy Friday in our question. After all, in this column, […]

  • How to use ASP.NET Core application running Vue and deploying on IIS

    Time:2021-4-11

    preface We have applied it to the project since. Net core 1.0, but I’m not sure ASP.NET Some principles of core have not been studied yet, and are limited to being able to use. However, there are a large number of articles in the garden. Let’s talk about how to use them in our spare […]

  • ASP.NET Problems and solutions of middleware with initial parameters in core 2.0

    Time:2020-11-28

    problem How to ASP.NET Core 2.0 passes initial parameters to middleware? answer In an empty project, create a poco (plain old CLR object) to save the required parameters of middleware: public class GreetingOptions { public string GreetAt { get; set; } public string GreetTo { get; set; } } Add a middleware: public class GreetingMiddleware […]

  • Talking about ASP.NET Core 2.0 middleware with initial parameters

    Time:2020-11-25

    problem How to ASP.NET Core 2.0 passes initial parameters to middleware? answer In an empty project, create a poco (plain old CLR object) to save the required parameters of middleware: public class GreetingOptions { public string GreetAt { get; set; } public string GreetTo { get; set; } } Add a middleware: public class GreetingMiddleware […]

  • ASP.NET Core 2.0 local file operation problems and Solutions

    Time:2020-11-19

    problem How to ASP.NET Limited access to local directory and file information in core 2.0? answer Create an empty project, modify the startup class, and add the services needed to access local files public void ConfigureServices(IServiceCollection services) { services.AddSingleton<IFileProvider>( new PhysicalFileProvider(Directory.GetCurrentDirectory())); } Create a middleware, read all the files in the root directory, and output […]

  • [translation] ASP.NET Core 2.0 routing engine details

    Time:2020-11-17

    This paper introduces the ASP.NET 2. Details of the core are as follows: problem ASP.NET How does the routing engine of core 2.0 work? answer Create an MVC middleware and an empty service class public void ConfigureServices(IServiceCollection services) { services.AddMvc(); } public void Configure(IApplicationBuilder app, IHostingEnvironment env) { app.UseMvc(routes => { routes.MapRoute( name: “goto_one”, template: […]

  • Detailed explanation ASP.NET Core 2.0 view engine

    Time:2020-11-15

    problem How to ASP.NET Using the razor engine to create views in core 2.0? answer Create an empty item, modify Startup.cs Add MVC service and request middleware public void ConfigureServices(IServiceCollection services) { services.AddMvc(); } public void Configure(IApplicationBuilder app, IHostingEnvironment env) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseMvc(routes => { routes.MapRoute( name: “default”, template: “{controller=Home}/{action=Index}/{id?}”); }); […]

  • Detailed explanation ASP.NET Web address generation of core 2.0 routing engine

    Time:2020-11-14

    problem How to ASP.NET In core 2.0, the routing engine generates the web address? answer Create an empty item, modify Startup.cs File, add MVC service and middleware: public void ConfigureServices(IServiceCollection services) { services.AddMvc(); } public void Configure(IApplicationBuilder app, IHostingEnvironment env) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseMvc(routes => { routes.MapRoute( name: “goto_one”, template: “one”, defaults: […]

  • Talking about ASP.NET Core 2.0 layout page

    Time:2020-11-12

    This paper introduces the ASP.NET The core 2.0 layout page is shared with you as follows: problem How to ASP.NET Sharing visible elements, code blocks, and instructions in a core 2.0 project? answer Create an empty project. First add the greetingservice service and the userviewmodel model public interface IGreetingService { string Greet(string firstname, string surname); […]

  • Using identity to store data with dapper in. Net core2.0

    Time:2020-10-23

    Preface I haven’t written a blog for many days. In view of the rise of leisure and boredom, I want to write a blog, so I should make a note for myself. After so many days, my writing is still so bad, please forgive me. Today, I’d like to share some of the actual situations […]

  • ASP.NET Core 2.0 webapi global configuration and log instance

    Time:2020-7-20

    Recently, some of the original webservces are converted into webapi, which is used directly ASP.Net Core 2.0 framework, in use, found with the original asp.net Different places, through the search has been slowly solved, record down for backup. 1、 Global configuration stay asp.net The global change configuration is written in web.config , as shown below […]