{"id":921,"date":"2023-03-07T08:00:00","date_gmt":"2023-03-07T08:00:00","guid":{"rendered":"https:\/\/www.naveedulhaq.com\/?p=921"},"modified":"2023-03-07T10:37:57","modified_gmt":"2023-03-07T10:37:57","slug":"middleware-in-asp-net","status":"publish","type":"post","link":"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/middleware-in-asp-net\/","title":{"rendered":"Middleware in ASP.NET"},"content":{"rendered":"\n<p>If you&#8217;re a developer working with ASP.NET, you&#8217;ve likely heard the term &#8220;middleware&#8221; thrown around quite a bit. But what exactly is it, and why is it so important? Put simply, middleware in ASP.NET is a crucial software component that is responsible for handling HTTP requests and responses within the web application pipeline.<\/p>\n\n\n\n<p>In this guide, we&#8217;ll take a deep dive into what middleware is, what benefits it can offer, and how you can start using it in your own ASP.NET projects.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Why Middleware?<\/strong><\/h2>\n\n\n\n<p>Whether you&#8217;re a seasoned developer or just getting started with ASP.NET, understanding middleware is essential to building robust and reliable web applications.<\/p>\n\n\n\n<p>Before getting into the core functionality of the Middleware in ASP.Net, let\u2019s uncover some of its notable benefits:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Reusability: <\/strong>Middleware components can be reused across multiple parts of an application, making it easier to share functionality and keep code organized.<\/li>\n\n\n\n<li><strong>Separation of Concerns: <\/strong>Middleware components allow developers to separate concerns such as authentication, logging, and error handling into separate components. This improves the maintainability and testability of the codebase.<\/li>\n\n\n\n<li><strong>Customization:<\/strong> Middleware components can be customized to meet specific requirements. For example, a logging middleware component can be configured to log requests and responses to a specific destination, such as a file or a database.<\/li>\n\n\n\n<li><strong>Pipeline Execution:<\/strong> Middleware components are executed in a specific order, allowing developers to control the request-handling process. This makes it possible to add or remove components as needed to modify the request-handling behaviour.<\/li>\n\n\n\n<li><strong>Performance:<\/strong> Middleware components can be used to implement caching, compression, and other performance optimizations, improving the performance of an application.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"618\" height=\"326\" src=\"https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2023\/03\/middleware-in-asp.net-c-sharp.png\" loading=\"lazy\" alt=\"Middleware in ASP.NET\" class=\"wp-image-932\" srcset=\"https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2023\/03\/middleware-in-asp.net-c-sharp.png 618w, https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2023\/03\/middleware-in-asp.net-c-sharp-300x158.png 300w\" sizes=\"auto, (max-width: 618px) 100vw, 618px\" \/><figcaption class=\"wp-element-caption\">Middleware in ASP.NET<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>How to Use Middleware in ASP.Net?<\/strong><\/h2>\n\n\n\n<p>Eager to learn how Middleware is used in ASP.Net? We have a step-by-step procedure right here for you:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Open the ASP.Net Project<\/strong><\/h3>\n\n\n\n<p>First, create a new ASP.NET project in Visual Studio.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Open the Startup.cs File and Add Malware Components<\/strong><\/h3>\n\n\n\n<p>First things first, let&#8217;s open up the &#8220;Startup.cs&#8221; file. That&#8217;s the one where the Configure method is hiding. This is where you&#8217;ll be able to add your middleware components. Once you&#8217;re in the Configure method, you can add in whatever middleware component you want to use.&nbsp;<\/p>\n\n\n\n<p>So let&#8217;s say you&#8217;re trying to handle authentication. Just copy and paste this code snippet:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>app.UseAuthentication();<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Add Custom Malware Components<\/strong><\/h3>\n\n\n\n<p>You can also add custom middleware components containing code snippets. To do this, create a new class file in the project and add your middleware code. Here&#8217;s an example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>using System.Threading.Tasks;\nusing Microsoft.AspNetCore.Builder;\nusing Microsoft.AspNetCore.Http;\n\npublic class MyMiddleware\n{\n    private readonly RequestDelegate _next;\n\n    public MyMiddleware(RequestDelegate next)\n    {\n        _next = next;\n    }\n    public async Task InvokeAsync(HttpContext context)\n    {\n        \/\/ Add your code here\n        await _next(context);\n    }\n}<\/code><\/pre>\n\n\n\n<p>Now, add that custom middleware in the pipeline as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public void Configure(IApplicationBuilder app, IWebHostEnvironment env)\n{\n    \/\/ Add the custom middleware to the pipeline\n    app.UseMiddleware&lt;MyMiddleware&gt;();\n\n    \/\/ Add other middleware components here...\n}<\/code><\/pre>\n\n\n\n<p>Now, what\u2019s after that? Build\/Run the application to test the functionality of the middleware.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Adding Third-Party Middleware Components<\/strong><\/h3>\n\n\n\n<p>Apart from the custom middleware components, you can add third-party middleware components. For this, you need to install the middleware component using the Nuget package manager. As an example, the following code is executed:&nbsp;<\/p>\n\n\n\n<p><strong>Example<\/strong><\/p>\n\n\n\n<p>To add the Microsoft.AspNetCore.StaticFiles middleware component, you could add the following code:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>app.UseStaticFiles();<\/code><\/pre>\n\n\n\n<p>After that, save the changes in the \u201c<strong>Startup.cs,<\/strong>\u201d and the middleware component will be executed for all incoming requests.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Wrap Up<\/strong><\/h2>\n\n\n\n<p>Middleware in ASP.NET is a simple and powerful way to build web applications that are easy to maintain, test, and customize. You have learned the purpose\/benefit of the Middleware in ASP.NET and how to use it for HTTP requests.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;re a developer working with ASP.NET, you&#8217;ve likely heard the term &#8220;middleware&#8221; thrown around quite a bit. But what exactly is it, and why&#8230;<\/p>\n","protected":false},"author":3,"featured_media":641,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[11,8,62,37,32,56],"class_list":["post-921","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dot-net-core","tag-dot-net-core","tag-dot-net-framework","tag-asp-net","tag-c","tag-developer","tag-visual-studio"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Middleware in ASP.NET - Naveed Ul-Haq&#039;s blog<\/title>\n<meta name=\"description\" content=\"Middleware in ASP.NET - .NET - AI, Optimizely, Azure &amp; more\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/middleware-in-asp-net\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Middleware in ASP.NET - Naveed Ul-Haq&#039;s blog\" \/>\n<meta property=\"og:description\" content=\"Middleware in ASP.NET - .NET - AI, Optimizely, Azure &amp; more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/middleware-in-asp-net\/\" \/>\n<meta property=\"og:site_name\" content=\"Naveed Ul-Haq&#039;s blog\" \/>\n<meta property=\"article:published_time\" content=\"2023-03-07T08:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-03-07T10:37:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2021\/11\/240px-.NET_Logo.svg_.png\" \/>\n\t<meta property=\"og:image:width\" content=\"240\" \/>\n\t<meta property=\"og:image:height\" content=\"240\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Abdul Mannan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Abdul Mannan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/dot-net-core\\\/middleware-in-asp-net\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/dot-net-core\\\/middleware-in-asp-net\\\/\"},\"author\":{\"name\":\"Abdul Mannan\",\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/#\\\/schema\\\/person\\\/8babf3cd198e47e5c727f67880ea7977\"},\"headline\":\"Middleware in ASP.NET\",\"datePublished\":\"2023-03-07T08:00:00+00:00\",\"dateModified\":\"2023-03-07T10:37:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/dot-net-core\\\/middleware-in-asp-net\\\/\"},\"wordCount\":579,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/#\\\/schema\\\/person\\\/dd6db5980b965fcae41e096d357c65c9\"},\"image\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/dot-net-core\\\/middleware-in-asp-net\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.naveedulhaq.com\\\/wp-content\\\/uploads\\\/2021\\\/11\\\/240px-.NET_Logo.svg_.png\",\"keywords\":[\".net core\",\".net framework\",\"asp.net\",\"c#\",\"developer\",\"visual-studio\"],\"articleSection\":[\".NET\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/dot-net-core\\\/middleware-in-asp-net\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/dot-net-core\\\/middleware-in-asp-net\\\/\",\"url\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/dot-net-core\\\/middleware-in-asp-net\\\/\",\"name\":\"Middleware in ASP.NET - Naveed Ul-Haq&#039;s blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/dot-net-core\\\/middleware-in-asp-net\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/dot-net-core\\\/middleware-in-asp-net\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.naveedulhaq.com\\\/wp-content\\\/uploads\\\/2021\\\/11\\\/240px-.NET_Logo.svg_.png\",\"datePublished\":\"2023-03-07T08:00:00+00:00\",\"dateModified\":\"2023-03-07T10:37:57+00:00\",\"description\":\"Middleware in ASP.NET - .NET - AI, Optimizely, Azure &amp; more\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/dot-net-core\\\/middleware-in-asp-net\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/dot-net-core\\\/middleware-in-asp-net\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/dot-net-core\\\/middleware-in-asp-net\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.naveedulhaq.com\\\/wp-content\\\/uploads\\\/2021\\\/11\\\/240px-.NET_Logo.svg_.png\",\"contentUrl\":\"https:\\\/\\\/www.naveedulhaq.com\\\/wp-content\\\/uploads\\\/2021\\\/11\\\/240px-.NET_Logo.svg_.png\",\"width\":240,\"height\":240,\"caption\":\".net\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/dot-net-core\\\/middleware-in-asp-net\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.naveedulhaq.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Middleware in ASP.NET\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/#website\",\"url\":\"https:\\\/\\\/www.naveedulhaq.com\\\/\",\"name\":\"Naveed Ul-Haq's blog\",\"description\":\"AI, Optimizely, Azure &amp; more\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/#\\\/schema\\\/person\\\/dd6db5980b965fcae41e096d357c65c9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.naveedulhaq.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/#\\\/schema\\\/person\\\/dd6db5980b965fcae41e096d357c65c9\",\"name\":\"Naveed Ul-Haq\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g\",\"caption\":\"Naveed Ul-Haq\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g\"},\"description\":\"I lead engineering delivery teams for digital commerce and digital experience platforms, combining hands-on architecture experience with strong delivery governance. Over 20+ years, I\u2019ve built and led cross\u2011functional teams (engineering, BA, QA) delivering modern cloud solutions on Azure, microservices, APIs and eCommerce\\\/CMS platforms. My recent focus includes AI-enabled commerce automation: product ingestion and enrichment workflows, content optimisation for SEO and shopping feeds, and agentic tooling to improve marketing and accessibility workflows. I\u2019m passionate about building high-performing teams, establishing quality\\\/release standards, and delivering measurable outcomes across performance, reliability, and speed of change.\",\"sameAs\":[\"https:\\\/\\\/www.naveedulhaq.com\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/naveedulhaq\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/#\\\/schema\\\/person\\\/8babf3cd198e47e5c727f67880ea7977\",\"name\":\"Abdul Mannan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7021bf97f2da3c29882f0e194e341d6abcc2b18abbbbf1e8ea688017b2323d21?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7021bf97f2da3c29882f0e194e341d6abcc2b18abbbbf1e8ea688017b2323d21?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7021bf97f2da3c29882f0e194e341d6abcc2b18abbbbf1e8ea688017b2323d21?s=96&d=mm&r=g\",\"caption\":\"Abdul Mannan\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Middleware in ASP.NET - Naveed Ul-Haq&#039;s blog","description":"Middleware in ASP.NET - .NET - AI, Optimizely, Azure &amp; more","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/middleware-in-asp-net\/","og_locale":"en_GB","og_type":"article","og_title":"Middleware in ASP.NET - Naveed Ul-Haq&#039;s blog","og_description":"Middleware in ASP.NET - .NET - AI, Optimizely, Azure &amp; more","og_url":"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/middleware-in-asp-net\/","og_site_name":"Naveed Ul-Haq&#039;s blog","article_published_time":"2023-03-07T08:00:00+00:00","article_modified_time":"2023-03-07T10:37:57+00:00","og_image":[{"width":240,"height":240,"url":"https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2021\/11\/240px-.NET_Logo.svg_.png","type":"image\/png"}],"author":"Abdul Mannan","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Abdul Mannan","Estimated reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/middleware-in-asp-net\/#article","isPartOf":{"@id":"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/middleware-in-asp-net\/"},"author":{"name":"Abdul Mannan","@id":"https:\/\/www.naveedulhaq.com\/#\/schema\/person\/8babf3cd198e47e5c727f67880ea7977"},"headline":"Middleware in ASP.NET","datePublished":"2023-03-07T08:00:00+00:00","dateModified":"2023-03-07T10:37:57+00:00","mainEntityOfPage":{"@id":"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/middleware-in-asp-net\/"},"wordCount":579,"commentCount":0,"publisher":{"@id":"https:\/\/www.naveedulhaq.com\/#\/schema\/person\/dd6db5980b965fcae41e096d357c65c9"},"image":{"@id":"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/middleware-in-asp-net\/#primaryimage"},"thumbnailUrl":"https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2021\/11\/240px-.NET_Logo.svg_.png","keywords":[".net core",".net framework","asp.net","c#","developer","visual-studio"],"articleSection":[".NET"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/middleware-in-asp-net\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/middleware-in-asp-net\/","url":"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/middleware-in-asp-net\/","name":"Middleware in ASP.NET - Naveed Ul-Haq&#039;s blog","isPartOf":{"@id":"https:\/\/www.naveedulhaq.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/middleware-in-asp-net\/#primaryimage"},"image":{"@id":"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/middleware-in-asp-net\/#primaryimage"},"thumbnailUrl":"https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2021\/11\/240px-.NET_Logo.svg_.png","datePublished":"2023-03-07T08:00:00+00:00","dateModified":"2023-03-07T10:37:57+00:00","description":"Middleware in ASP.NET - .NET - AI, Optimizely, Azure &amp; more","breadcrumb":{"@id":"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/middleware-in-asp-net\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/middleware-in-asp-net\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/middleware-in-asp-net\/#primaryimage","url":"https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2021\/11\/240px-.NET_Logo.svg_.png","contentUrl":"https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2021\/11\/240px-.NET_Logo.svg_.png","width":240,"height":240,"caption":".net"},{"@type":"BreadcrumbList","@id":"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/middleware-in-asp-net\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.naveedulhaq.com\/"},{"@type":"ListItem","position":2,"name":"Middleware in ASP.NET"}]},{"@type":"WebSite","@id":"https:\/\/www.naveedulhaq.com\/#website","url":"https:\/\/www.naveedulhaq.com\/","name":"Naveed Ul-Haq's blog","description":"AI, Optimizely, Azure &amp; more","publisher":{"@id":"https:\/\/www.naveedulhaq.com\/#\/schema\/person\/dd6db5980b965fcae41e096d357c65c9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.naveedulhaq.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":["Person","Organization"],"@id":"https:\/\/www.naveedulhaq.com\/#\/schema\/person\/dd6db5980b965fcae41e096d357c65c9","name":"Naveed Ul-Haq","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/secure.gravatar.com\/avatar\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g","caption":"Naveed Ul-Haq"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g"},"description":"I lead engineering delivery teams for digital commerce and digital experience platforms, combining hands-on architecture experience with strong delivery governance. Over 20+ years, I\u2019ve built and led cross\u2011functional teams (engineering, BA, QA) delivering modern cloud solutions on Azure, microservices, APIs and eCommerce\/CMS platforms. My recent focus includes AI-enabled commerce automation: product ingestion and enrichment workflows, content optimisation for SEO and shopping feeds, and agentic tooling to improve marketing and accessibility workflows. I\u2019m passionate about building high-performing teams, establishing quality\/release standards, and delivering measurable outcomes across performance, reliability, and speed of change.","sameAs":["https:\/\/www.naveedulhaq.com","https:\/\/www.linkedin.com\/in\/naveedulhaq\/"]},{"@type":"Person","@id":"https:\/\/www.naveedulhaq.com\/#\/schema\/person\/8babf3cd198e47e5c727f67880ea7977","name":"Abdul Mannan","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/secure.gravatar.com\/avatar\/7021bf97f2da3c29882f0e194e341d6abcc2b18abbbbf1e8ea688017b2323d21?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/7021bf97f2da3c29882f0e194e341d6abcc2b18abbbbf1e8ea688017b2323d21?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/7021bf97f2da3c29882f0e194e341d6abcc2b18abbbbf1e8ea688017b2323d21?s=96&d=mm&r=g","caption":"Abdul Mannan"}}]}},"_links":{"self":[{"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/posts\/921","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/comments?post=921"}],"version-history":[{"count":0,"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/posts\/921\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/media\/641"}],"wp:attachment":[{"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/media?parent=921"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/categories?post=921"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/tags?post=921"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}