Combine classic ASP.NET and ASP.NET MVC within one web application

后端 未结 3 1566
予麋鹿
予麋鹿 2021-02-06 02:21

We currently have a classic ASP.NET web application which serves as our API. It basically has a bunch of ASMX Web Services, but these are really cumbersome to work with from Jav

相关标签:
3条回答
  • 2021-02-06 02:49

    An ASP.NET Webforms application can become ASP.NET MVC enabled by following some simple steps,its quite easy infact see this link if you want to go rest for mvc heres a article Rest for mvc by Phil Haack and Rest like nature of MVC heres a comparison Rest in asp net vs wcf

    0 讨论(0)
  • 2021-02-06 02:59

    Aha! It seems that this is very much possible. Here's a comprehensive article which describes what should be done.

    0 讨论(0)
  • 2021-02-06 03:04

    The whole goal of routing is to break the one-to-one association between URLs and files in the server’s file system. However, the routing system still does check the file system to see if an incoming URL happens to match a file or disk, and if so, routing ignores the request (bypassing any route entries that the URL might also match) so that the file will be served directly.

    So, to answer on a part of your question "is this possible at all": Yes, because routing system will recognize the .asmx file on the file system and it will process it in classic asp.net web services manner.

    For the second question I'm not sure because I haven't been doing anything complex with web service inside of the asp.net mvc application.

    0 讨论(0)
提交回复
热议问题