• Asp.net core webapi uses swagger to generate help page instances


    Recently, our team has been carrying out the transformation of. Net core, and web development has evolved towards the technical architecture of front-end and back-end separation. Our background mainly adopts asp.net core webapi for development. At the beginning, this problem of low efficiency exists in each debugging and communication with front-end personnel. Once, when looking […]

  • . net core uses redis based on stackexchange.redis


    . net core uses redis based on stackexchange.redis tutorial, as follows 1、 Add reference package StackExchange.Redis Microsoft.Extensions.Configuration 2、 Modify the configuration file appsettings.json { “RedisConfig”: { “Redis_Default”: { “Connection”: “ 6379”, “InstanceName”: “Redis1: ” }, “Redis_6”: { “Connection”: “ 6379”, “DefaultDatabase”: 6, “InstanceName”: “Redis2: ” } } } 3、 Simple packaging Redisclient.cs class public class […]

  • Detailed steps of deploying. Net core environment under Linux


    be careful:The environment for installing. Net core on Linux requires a 64 bit system The installation deployment is as follows: 1. Add dotnet source to apt get Ubuntu 14.04 / Linux Mint 17 sudo sh -c ‘echo “deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main” > /etc/apt/sources.list.d/dotnetdev.list’ sudo apt-key adv –keyserver hkp://keyserver.ubuntu.com:80 –recv-keys 417A0893 sudo apt-get update Ubuntu […]

  • Detailed explanation of. Net core debugging on vs2017 Linux


    Visual studio 2017 debugs. Net core applications on Linux via SSH. Article environment Development environment: win10 x64 visual studio 2017 Deployment environment: Ubuntu 14.04 x64. Net core SDK 1.0.1 Install the. Net core SDK on Ubuntu Ubuntu 14.04 x64 sudo sh -c ‘echo “deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main” > /etc/apt/sources.list.d/dotnetdev.list’ sudo apt-key adv –keyserver hkp://keyserver.ubuntu.com:80 […]

  • . net c# create a simple instance of WebService service


    Web service is an application based on programmable web, which is used to develop distributed and interoperable applications. It is also a kind of web service The characteristics of WebService are as follows: 1. Use XML (Standard General Markup Language) as the format of data interaction. 2. Cross platform. Because XML is used, data exchange […]

  • .net access to Alipay’s payment interface


    H5 mobile phone website access Alipay‘s payment interface, recommended to use Alipay to provide rapid development of SDK. I use SDK development Reference namespace using Aop.Api; using Aop.Api.Request; using Aop.Api.Response; using Aop.Api.Util; Some constants need to be defined on the first page static string serverUrl = “https://openapi.alipaydev.com/gateway.do”; static string app_ id = “**”; // Developer’s […]

  • Explain the use of cookie Middleware in asp.net core


    Using cookie Middleware in http: / / asp.net core Asp.net core provides cookie middleware to serialize user topics into an encrypted cookie, verify the cookie in subsequent requests, reproduce the user and assign it to the user attribute of httpcontext object. If you want to provide your own login method and user data, you can […]

  • Implementation code for improving program performance using ref and span in. Net core


    1、 Foreword In fact, when it comes to ref, many students already know it. Ref is a language feature of c# 7.0. It provides developers with a mechanism to return local variable references and value references.Span is also a complex data type based on ref syntax. In the second half of the article, I will […]

  • Tutorial on using mongodb in. Net


    What is mongodb Mongodb is based on document storage (not tables). It is a product between relational database and non relational database. It is the most functional and relational database among non relational databases. The data structure he supports is very loose, which is a JSON like bson format, so it can store more complex […]

  • Explain c#. Net core network request in detail


    This article is under the environment of vs2017, and the version of. Net core is above 1.1. During this period, because. Net core is not based on IIS, our past network request codes may be incompatible and report errors under the. Net core framework. Here is a general introduction to how to make HTTP requests […]

  • Details of using forms validation in. Net MVC


    . net MVC uses forms verification for your reference. The details are as follows This is how the folder is divided First set in web.config Authentication and authorization nodes <system.web> <authentication mode=”Forms”> <forms loginUrl=”~/Login/Index” timeout=”2880″ defaultUrl=”~/Home/Index”/> </authentication> <anonymousIdentification enabled=”true”/> <authorization> <deny users=”?”/> <!– Deny anonymous access — > </authorization> <compilation debug=”true” targetFramework=”4.5″ /> <httpRuntime targetFramework=”4.5″ […]