- ASP.NET Core 2 High Performance(Second Edition)
- James Singleton
- 370字
- 2021-07-08 09:38:57
What's new in ASP.NET Core 2
ASP.NET Core 2 takes advantage of all the improvements to .NET Core 2, if that is what you choose to run it on. It will also run on .NET Framework 4.7, but it's best to run it on .NET Core if you can. With the increase in scope and support of .NET Core 2, this should be less of a problem than it was previously.
.NET Core 2 includes a new metapackage, so you only need to reference one NuGet item to get all the things. However, it is still composed of individual packages, if you want to pick and choose. They haven't reverted to the bad old days of having one huge System.Web assembly. A new package-trimming feature ensures that if you don't use a package, then its binaries won't be included in your deployment, even if you use a metapackage to reference it.
There is also a sensible default for setting up a web host configuration. You don't need to add logging, Kestrel, and IIS individually anymore. Logging has also gotten simpler and, as it is built in, you have no excuses not to use it from the start.
A new feature is support for controllerless Razor Pages. This is exactly what it sounds like, and it allows you to write pages with just a Razor template. It is similar to the Web Pages product, not to be confused with Web Forms. There is talk of Web Forms making a comeback; if this happens, then hopefully, the abstraction will be thought out more and it won't carry so much state around with it.
There is a new authentication model that makes better use of dependency injection. ASP.NET Core Identity allows you to use OpenID and OAuth 2 and get access tokens for your APIs. You may also want to investigate the Identity Server 4 project that provides a lot of similar functionality.
A nice time saver is that you no longer need to emit anti-forgery tokens in forms (to prevent Cross-Site Request Forgery) with attributes to validate them on post methods. This is all done automatically for you, which should prevent you from forgetting to do this and leaving a security vulnerability.
- Implementing Modern DevOps
- Hands-On Machine Learning with scikit:learn and Scientific Python Toolkits
- C語言程序設(shè)計(jì)習(xí)題解析與上機(jī)指導(dǎo)(第4版)
- Building a RESTful Web Service with Spring
- 構(gòu)建移動(dòng)網(wǎng)站與APP:HTML 5移動(dòng)開發(fā)入門與實(shí)戰(zhàn)(跨平臺(tái)移動(dòng)開發(fā)叢書)
- Raspberry Pi Networking Cookbook(Second Edition)
- iOS開發(fā)實(shí)戰(zhàn):從零基礎(chǔ)到App Store上架
- Python零基礎(chǔ)快樂學(xué)習(xí)之旅(K12實(shí)戰(zhàn)訓(xùn)練)
- Implementing Cisco Networking Solutions
- Learning Apache Mahout Classification
- Java:High-Performance Apps with Java 9
- 單片機(jī)C語言程序設(shè)計(jì)實(shí)訓(xùn)100例
- PLC應(yīng)用技術(shù)(三菱FX2N系列)
- TMS320LF240x芯片原理、設(shè)計(jì)及應(yīng)用
- Java EE Web應(yīng)用開發(fā)基礎(chǔ)