- UseDevelopeerExceptionPage
- Captures synchronous and asynchronous System.Exception instances from the pipeline and generates HTML error responses.
- UseHsts
- Adds middleware for using HSTS, which adds the Strict-Transport-Security header.
- UseRouting
- Adds middleware that defines a point in the pipeline where routing decisions are made and must be combined with a call to UseEndpoints where the processing is then executed. This means that for our code, any URL paths that match / or /index or /page will be mapped to Razor Pages and match on /hello will be mapped to the anonymous delegate. Any other URL paths will be passed on to the next delegate for matching, for example, static files. This is why, although it looks like the mapping for Razor Pages and /hello happen after static files in the pipeline, they actually take priority because the call to UseRouting happens before UseStaticFiles.
- UseHttpsRedirection
- Adds middleware for redirecting HTTPS requests to HTTPS, so in our code request for htttp://lcocalhost:5000 would be modified to https://localhost:5001
- UseDefaultFiles
- Adds middleware that enables default file mapping on the current path, so in our code it would identify files such as index.html
- UseStaticFiles
- Adds middleware that looks in wwwroot for static files to return in the HTTP response.
- UseEndpoints
- Adds middleware to execute to generate response from decision made earlier in the pipeline. Two endpoints are added, as shown in the following sub-list.
- MapRazorPages
- Adds middleware that will map URL paths such as /suppliers to Razor Page file in the /Pages folder named suppliers.cshtml and return the result as the HTTP response.
- MapGet
- Adds middleware that will map URL paths such as /hello to an inline delegate writes plain test directly to the HTTP response.
Saturday, November 19, 2022
asp.net middleware extension methods
Subscribe to:
Post Comments (Atom)
methods available in Dapper
Dapper is a micro ORM library for .NET and .NET Core applications that allows you to execute SQL queries and map the results to objects. D...
-
Effect-hooks We have already used state hooks that were introduced along with React version 16.8.0 , which provide state to React compo...
-
Image processing Image processing is a method to perform some operation on an image, in order to get an enhanced image or to extract some us...
-
What is image processing? Image processing is a method to perform some operations on an image, in order to get an enhanced image or to extr...
No comments:
Post a Comment