Home > 类库下载 > net class library > What are the core functions of ASP.NET

What are the core functions of ASP.NET

清浅
Release: 2019-03-04 16:16:50
Original
4661 people have browsed it

The core functions of ASP.NET include the following aspects: cross-platform and container support, high performance, unified MVC and Web API framework, dependency injection and cross-site request forgery protection, etc.

ASP .NET is a web application development framework launched by Microsoft. Each update adds new features to help developers deploy highly scalable and performant web applications. Next, in the article, we will introduce some core functions in ASP.NET in detail, which will have a certain reference effect. I hope it will be helpful to everyone

What are the core functions of ASP.NET

【 Recommended course: ASP.NET Tutorial

There are many core functions inside the ASP.NET framework that can help us with common customer service issues It solves difficult problems and helps us do more and improve performance.

1. Cross-platform and container support

With the introduction of .NET Core, we can now deploy the created ASP.NET applications to

2, High performance in Windows, Linux and macOS

With the introduction of ASP.NET Core and Kestrel web server, ASP.NET is known as the fastest One of the web application frameworks. The new Kestrel web server was designed from the ground up to be lighter and faster by taking advantage of the asynchronous programming model.

What are the core functions of ASP.NET

3. Unified MVC and Web API framework

Before ASP.NET Core, MVC and Web API were most commonly used frame. MVC is specifically used to create web applications that serve HTML. Web API is designed to create RESTful services using JSON or XML.

After using ASP.NET Core, MVC and Web API have been merged to simplify development, and there are also new Razor Pages. They are mainly used to extend the MVC framework, allowing models to encapsulate controllers and pages, as well as two-way binding.

4. Dependency Injection

An important new feature of ASP.NET Core is built-in dependency injection. It's used heavily in ASP.NET MVC itself. This is the preferred way to pass record context, database context and other things to MVC controllers.

5, WebSockets and SignalR

ASP.NET has first-class support for WebSockets. This can be used to maintain long-running connections and communicate back and forth with the browser. SignalR is a complete framework that can also handle common scenarios easily. For example, when viewing the current monitoring data of a certain server, each time new data is received, it is immediately pushed to the browser so that it can be updated in real time.

What are the core functions of ASP.NET

6. Cross-site request forgery (CSRF) protection

Security is very important. It's also one of those things that can do a lot to prevent certain types of attacks. CSRF is referencing hijacking a user's authenticated session to perform an action they did not initiate. And ASP.NET has a good framework for preventing these types of attacks. It generates anti-counterfeiting tokens.

7. "Self-Hosted" Web Applications

Sometimes, it is necessary to create a web application that will be deployed on the desktop instead of the server running IIS. The ASP.NET analyzer Prefix is ​​a good example at this time. Its front end is all HTML loaded from an ASP.NET application running as a Windows service.

We can create self-hosted ASP.NET web applications in a few different ways. In .NET 4.5 you can do it using Owin, Nancy or WCF. For Prefix, we are using ASP.NET Web API with Owin.

8. Action filter

An important feature of ASP.NET is support for extensible filters. This allows us to implement functionality that can be applied to the entire controller or action without modifying the action itself. Filters are used to specify caching, error handling, authorization, or any custom logic to be implemented.

9. Extensible output caching

This feature allows ASP.NET to cache the output generated by the page and provide this cached content for future requests. It stores data that is not updated frequently and outputs that specific data from a cached location.

ASP.NET makes it easy to specify how long to cache any request via common HTTP headers. It also supports caching output in the memory of the web server itself. You can even use Redis or another provider to handle output caching.

10. Globalization and localization

ASP.NET allows us to easily localize dates, numbers and text in web applications. ASP.NET supports customizing applications in multiple languages ​​through resource files. These resource files are considered a central repository that holds all text, and web pages can read this resource file and populate tags.

Summary: The above is the entire content of this article. I hope it will be helpful to everyone learning ASP.NET.

The above is the detailed content of What are the core functions of ASP.NET. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template