Adnan Maqbool Khan’s Post

View profile for Adnan Maqbool Khan, graphic

Team Leader | .NET | Microservices | Azure | Vue | React | Angular | Typescript | RabbitMQ | SQL | MSTest | Cypress

𝐑𝐮𝐧, 𝐔𝐬𝐞, 𝐚𝐧𝐝 𝐌𝐚𝐩 𝐌𝐞𝐭𝐡𝐨𝐝𝐬 𝐢𝐧 .𝐍𝐄𝐓 𝐏𝐢𝐩𝐞𝐥𝐢𝐧𝐞 💡 In ASP.NET Core, the Run, Use, and Map extension methods are used to configure middleware in the application pipeline. Here's a breakdown of each method and its purpose: 1- 𝐑𝐮𝐧: The Run method is used to terminate the pipeline and generate a response. It should be used at the end of the middleware pipeline because it stops the pipeline from further processing. 2- 𝐔𝐬𝐞: The Use method is used to add middleware to the pipeline. It can handle requests and pass them to the next middleware in the pipeline using the next parameter. 3- 𝐌𝐚𝐩: The Map method is used to map middleware to specific request paths. It allows you to branch the middleware pipeline based on the request path. 𝐈𝐟 𝐲𝐨𝐮 𝐟𝐢𝐧𝐝 𝐭𝐡𝐢𝐬 𝐮𝐬𝐞𝐟𝐮𝐥, 𝐫𝐞𝐩𝐨𝐬𝐭 ♻️ 𝐚𝐧𝐝 𝐬𝐩𝐫𝐞𝐚𝐝 𝐭𝐡𝐞 𝐤𝐧𝐨𝐰𝐥𝐞𝐝𝐠𝐞. 𝐅𝐨𝐥𝐥𝐨𝐰 🔔 Adnan Maqbool Khan 𝐟𝐨𝐫 𝐦𝐨𝐫𝐞 𝐬𝐮𝐜𝐡 𝐜𝐨𝐧𝐭𝐞𝐧𝐭.

  • text
Pavle Davitković

.NET Engineer @Ingsoftware

1mo

What is you preferred way for writing middlewares?

Anton Martyniuk

Tech Lead | Follow Me to Advance Your Career in .NET and Software Architecture

1mo

You can also apply filters to the Use method

Muhammad Babar

Top Voice 27k+ | .Net Content Creator | SSE @ Systems Limited | .Net Fullstack | Microservices | CQRS | Clean | Azure | C# | Vue | React | Angular | Unit Testing

1mo

Insightful

Nikola Knežević

Daily Insights, Features, and fresh knowledge about .NET, Software Engineering, and Software Architectures

1mo

Thanks for sharing Adnan.

Poorna Soysa

Tech Enthusiast | .NET | C# | Azure | AWS | SAP

1mo

Thanks for sharing Adnan.

Mayank Ahuja

Follow for Your Daily Dose of Coding, Software Development & System Design Tips | Tech Book Buff | Exploring AI | Everything I write reflects my personal thoughts and has nothing to do with my employer. 👍

1mo

Good to know, Adnan.

Aram Tchekrekjian

Daily tips to get better in .NET and C# | Microsoft MVP | codingsonata.com | Sr. Engineering Manager at Aramex

1mo

Core methods to manage your pipeline with Middleware, great post Adnan.

Shubham Wadekar

Writes to 100k+ | Data Engineer | Data Analytics | Data Science | Artificial Intelligence | Linkedin Growth, Social Media Marketing, Influencer Marketing

1mo

Very informative

Ahmed Yezdane

Back-End Developer | ASP.NET Core | Back end Developer Dotnet | .Net Enthusiastic | Software Engineer .Net

1mo

Nice explaination Adnan 👍🏻

SERKUT YILDIRIM

Microsoft MVP | Helpful Posts About .NET, C# and Visual Studio

1mo

Useful tips

See more comments

To view or add a comment, sign in

Explore topics