ASP.NET Web API 2.0 pipeline and ASP.NET Core Web API pipeline differences

Multi tool use
Multi tool use












2















I recently started migrating my app from Web.Api .NET standard to .Net Core.



First of all are all the steps of the Web Api pipeline still there?



When i say all the steps i mean :
Web api pipeline Poster



In terms of usage i can see the filters are applied through the



 [ServiceFilter(typeof(NameOfAttribute))]


But in a variety of articles like this one :
https://andrewlock.net/asp-net-core-in-action-filters/



i can see different kind of filters like resource and results filters.



Also i cannot see the usage of Delegating Handlers.



Where should we integrate the functionality of the previous pipeline with the new standards?



Thanks










share|improve this question



























    2















    I recently started migrating my app from Web.Api .NET standard to .Net Core.



    First of all are all the steps of the Web Api pipeline still there?



    When i say all the steps i mean :
    Web api pipeline Poster



    In terms of usage i can see the filters are applied through the



     [ServiceFilter(typeof(NameOfAttribute))]


    But in a variety of articles like this one :
    https://andrewlock.net/asp-net-core-in-action-filters/



    i can see different kind of filters like resource and results filters.



    Also i cannot see the usage of Delegating Handlers.



    Where should we integrate the functionality of the previous pipeline with the new standards?



    Thanks










    share|improve this question

























      2












      2








      2








      I recently started migrating my app from Web.Api .NET standard to .Net Core.



      First of all are all the steps of the Web Api pipeline still there?



      When i say all the steps i mean :
      Web api pipeline Poster



      In terms of usage i can see the filters are applied through the



       [ServiceFilter(typeof(NameOfAttribute))]


      But in a variety of articles like this one :
      https://andrewlock.net/asp-net-core-in-action-filters/



      i can see different kind of filters like resource and results filters.



      Also i cannot see the usage of Delegating Handlers.



      Where should we integrate the functionality of the previous pipeline with the new standards?



      Thanks










      share|improve this question














      I recently started migrating my app from Web.Api .NET standard to .Net Core.



      First of all are all the steps of the Web Api pipeline still there?



      When i say all the steps i mean :
      Web api pipeline Poster



      In terms of usage i can see the filters are applied through the



       [ServiceFilter(typeof(NameOfAttribute))]


      But in a variety of articles like this one :
      https://andrewlock.net/asp-net-core-in-action-filters/



      i can see different kind of filters like resource and results filters.



      Also i cannot see the usage of Delegating Handlers.



      Where should we integrate the functionality of the previous pipeline with the new standards?



      Thanks







      c# asp.net-core asp.net-web-api2 asp.net-core-webapi






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Dec 30 '18 at 11:30









      k.explorerk.explorer

      191112




      191112
























          1 Answer
          1






          active

          oldest

          votes


















          1














          Since classic Asp.Net and Asp.Net core are cognate technologies there are many common concepts in a request processing, but there are some differences and most likely you will have to rewrite some stuff in your project.



          As you noted there are new filters. They allow to handle request in more granular approach. You can use filters as you did it before just by decorating actions and controllers:



          [SomeFilter]
          public IActionResult SomeAction(){...}


          And (as before in classic Asp.Net) you can't use dependency injection through the filter constructor. Filters applied like that behave like a singleton. One instance is used for all requests.



          ServiceFilterAttribute and TypeFilterAttribute allow to use the dependency injection through the filter constructor. Optionally filters applied like that can behave like singletons or can be created every time (with dependency injection) for every request. You can adjust it by using IsReusable property. Read more about filter here.



          There are no more Delegating Handlers. Instead of you can create a custom middleware. You can see an example here.






          share|improve this answer
























          • Cheers man , you gave me a good start.

            – k.explorer
            Dec 31 '18 at 9:59











          • Just adding to the answer this article : docs.microsoft.com/en-us/aspnet/core/migration/…

            – k.explorer
            Jan 2 at 11:57











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53977236%2fasp-net-web-api-2-0-pipeline-and-asp-net-core-web-api-pipeline-differences%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          Since classic Asp.Net and Asp.Net core are cognate technologies there are many common concepts in a request processing, but there are some differences and most likely you will have to rewrite some stuff in your project.



          As you noted there are new filters. They allow to handle request in more granular approach. You can use filters as you did it before just by decorating actions and controllers:



          [SomeFilter]
          public IActionResult SomeAction(){...}


          And (as before in classic Asp.Net) you can't use dependency injection through the filter constructor. Filters applied like that behave like a singleton. One instance is used for all requests.



          ServiceFilterAttribute and TypeFilterAttribute allow to use the dependency injection through the filter constructor. Optionally filters applied like that can behave like singletons or can be created every time (with dependency injection) for every request. You can adjust it by using IsReusable property. Read more about filter here.



          There are no more Delegating Handlers. Instead of you can create a custom middleware. You can see an example here.






          share|improve this answer
























          • Cheers man , you gave me a good start.

            – k.explorer
            Dec 31 '18 at 9:59











          • Just adding to the answer this article : docs.microsoft.com/en-us/aspnet/core/migration/…

            – k.explorer
            Jan 2 at 11:57
















          1














          Since classic Asp.Net and Asp.Net core are cognate technologies there are many common concepts in a request processing, but there are some differences and most likely you will have to rewrite some stuff in your project.



          As you noted there are new filters. They allow to handle request in more granular approach. You can use filters as you did it before just by decorating actions and controllers:



          [SomeFilter]
          public IActionResult SomeAction(){...}


          And (as before in classic Asp.Net) you can't use dependency injection through the filter constructor. Filters applied like that behave like a singleton. One instance is used for all requests.



          ServiceFilterAttribute and TypeFilterAttribute allow to use the dependency injection through the filter constructor. Optionally filters applied like that can behave like singletons or can be created every time (with dependency injection) for every request. You can adjust it by using IsReusable property. Read more about filter here.



          There are no more Delegating Handlers. Instead of you can create a custom middleware. You can see an example here.






          share|improve this answer
























          • Cheers man , you gave me a good start.

            – k.explorer
            Dec 31 '18 at 9:59











          • Just adding to the answer this article : docs.microsoft.com/en-us/aspnet/core/migration/…

            – k.explorer
            Jan 2 at 11:57














          1












          1








          1







          Since classic Asp.Net and Asp.Net core are cognate technologies there are many common concepts in a request processing, but there are some differences and most likely you will have to rewrite some stuff in your project.



          As you noted there are new filters. They allow to handle request in more granular approach. You can use filters as you did it before just by decorating actions and controllers:



          [SomeFilter]
          public IActionResult SomeAction(){...}


          And (as before in classic Asp.Net) you can't use dependency injection through the filter constructor. Filters applied like that behave like a singleton. One instance is used for all requests.



          ServiceFilterAttribute and TypeFilterAttribute allow to use the dependency injection through the filter constructor. Optionally filters applied like that can behave like singletons or can be created every time (with dependency injection) for every request. You can adjust it by using IsReusable property. Read more about filter here.



          There are no more Delegating Handlers. Instead of you can create a custom middleware. You can see an example here.






          share|improve this answer













          Since classic Asp.Net and Asp.Net core are cognate technologies there are many common concepts in a request processing, but there are some differences and most likely you will have to rewrite some stuff in your project.



          As you noted there are new filters. They allow to handle request in more granular approach. You can use filters as you did it before just by decorating actions and controllers:



          [SomeFilter]
          public IActionResult SomeAction(){...}


          And (as before in classic Asp.Net) you can't use dependency injection through the filter constructor. Filters applied like that behave like a singleton. One instance is used for all requests.



          ServiceFilterAttribute and TypeFilterAttribute allow to use the dependency injection through the filter constructor. Optionally filters applied like that can behave like singletons or can be created every time (with dependency injection) for every request. You can adjust it by using IsReusable property. Read more about filter here.



          There are no more Delegating Handlers. Instead of you can create a custom middleware. You can see an example here.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Dec 30 '18 at 15:29









          AlbertAlbert

          2,57911015




          2,57911015













          • Cheers man , you gave me a good start.

            – k.explorer
            Dec 31 '18 at 9:59











          • Just adding to the answer this article : docs.microsoft.com/en-us/aspnet/core/migration/…

            – k.explorer
            Jan 2 at 11:57



















          • Cheers man , you gave me a good start.

            – k.explorer
            Dec 31 '18 at 9:59











          • Just adding to the answer this article : docs.microsoft.com/en-us/aspnet/core/migration/…

            – k.explorer
            Jan 2 at 11:57

















          Cheers man , you gave me a good start.

          – k.explorer
          Dec 31 '18 at 9:59





          Cheers man , you gave me a good start.

          – k.explorer
          Dec 31 '18 at 9:59













          Just adding to the answer this article : docs.microsoft.com/en-us/aspnet/core/migration/…

          – k.explorer
          Jan 2 at 11:57





          Just adding to the answer this article : docs.microsoft.com/en-us/aspnet/core/migration/…

          – k.explorer
          Jan 2 at 11:57


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53977236%2fasp-net-web-api-2-0-pipeline-and-asp-net-core-web-api-pipeline-differences%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          edwVRkh8,Hzdy94 jf2 so8g wrm2xjQL0Sxm gg4ipSnVc Z
          gDTn1sYOG5EI AxbE,53sHRSZ4HmWEjZHUqPyKDqQuG yJtOjm0QpNLZKYqR2 CIaHkAiZt3M335t0LV

          Popular posts from this blog

          Monofisismo

          Angular Downloading a file using contenturl with Basic Authentication

          Olmecas