Setting up Web API within WCF Project

前端 未结 3 959
不思量自难忘°
不思量自难忘° 2021-01-12 13:32

I have a little bit of a \"strange practise\" question. The requirement on an architecture of our project is to setup Web API with (if possible) all MVC goodness within WCF

3条回答
  •  迷失自我
    2021-01-12 13:49

    In fact there are no major restrictions on the use of the two technologies within the same project. By default wcf has a different "pipe line" than asp.net, but until this can be changed. Using the configuration below in web.config it is possible to configure wcf to use the same asp.net pipe line thus sharing the whole life cycle of the objects of the request. But do not believe that this approach is usual for all cases, other factors need to be considered to make that decision, for example, how do you plan to distribute your application? When you release a version of wcf you will also be releasing the web.api, in many cases you may not want this result.

    
    

提交回复
热议问题