Table of Contents 1. Create Asp.net web applications and Web Service services (1).Operating environment (2)Create project 2. Create a console application to call the Web Service created above 1. Create Asp.net web application and Web Service (1).Running environment Development Tools: Visual Studio 2022 Current (Free Community Edition) Framework version: .net framework4.7.2, higher .net 5 and […]
Tag: asp.net
ASP.NET Core filters
Filters in ASP.NET Core run before or after specific stages of the request processing pipeline. ASP.NET Core has many built-in filters, such as authorization, logging, caching, exception handling, etc. Filters can avoid problems in our projects Duplicate code What is the difference between ASP.NET Core middleware and filters? Middleware can operate on every request entering […]
Asp.NetCoreWebAPI deployed to Docker
Operation steps Asp.Net Core runs in a Linux Docker container 1. Create an Asp.Net Core Web API project with Dockerfile 2. Configure project parameters and related parameters for Docker operation Modify three files as needed 3. Publish to the registration center 4. The Docker container under Linux pulls the image from the registration center and […]
C# Winfrm calls Asp.net Core WebApi
Preface: Because I recently studied and learned Core, I spent two hours working on the following example, for reference only. 1. Create database The editor chose SqlSever (comes with VS2019) 1.1 Database creation 1.2 Create test table You can also create it manually, or execute the following statement CREATE TABLE [dbo].[T_SYS_USER] ( [ID] INT IDENTITY […]
ASP.NET Core Model Validation Series 2
1 Model level error message Model layer error messages are used for the entire entity, rather than a single attribute. We only need to provide a null value in the first parameter of the AddModelError() method, as shown in the following code: ModelState.AddModelError(“”, “Some Model-Level error”); Taking an example, suppose we don’t want the person […]
Design and implementation of online pet store system based on ASP.NET
Professional technology development, collection and attention to avoid getting lost Article directory 1. Project introduction 2. Development environment 3. Function introduction 4. Core code 5. Effect drawing 6. Article Table of Contents 1. Project introduction “Design and Implementation of Online Pet Store System Based on ASP.NET” is a management system designed and developed based on […]
Create a web backend using asp.net core web api, and connect and use the Sql Server database
Preface: Because I want to write an Android app to obtain movie data from the server, I need to build server-side code. I have learned C# before, so I want to use C# to implement the server segment code for testing. This article uses C# language and asp. The net core web api component builds […]
ASP.NET Core development Web API
2. The creation of Web Api and the introduction of Http type 2.1 Creation of ASP.Net Core Web API project 1. Create an ASP.NET Core Web API project Select New Project from the File menu. Enter “Web API” in the search box. Select the ASP.NET Core Web API template and select Next. In the Configure […]
[Transfer] [Asp.Net] asp.net (c#) web page jump
Under asp.net, page jumps are often needed. Here are several specific methods. Jump pages are available in most editing languages. Let’s introduce the three page jump methods of response.redirect, sever.execute server.transfer in .net respectively: ①response.redirect This method of jumping to a page is not fast because it takes 2 round trips (2 postbacks), but it […]
[Transfer] [Asp.Net] ASP.Net Response.ContentType detailed list
Different ContentType will affect the effect seen by the client. The default ContentType is text/html, which is the web page format. The code is as follows: What is displayed is a web page, and The original html code will be displayed.The following are some commonly used ContentTypes GIF images JPEG images TIFF images MICROSOFT WORD […]