How to create an API while using the ASP.NET form application

Asked 1 years ago, Updated 1 years ago, 79 views

For some reason, we are developing it with ASP.NET form application instead of MVC5.
However, I would like to create an API that does not have a form page in this project.
Is there a way?

c# .net asp.net

2022-09-30 19:22

2 Answers

Typically, ASMX Web Service or generic handler (ashx file) is used to create web services in ASP.NET Web Forms.You can also host WCF.


2022-09-30 19:22

It depends on the Web Forms and the version of Visual Studio you are using, but is it not acceptable to use MVC or Web API only for the API?

For example, VS2013 or later makes it easy to co-exist Web Forms/Web API/MVC in a single project, so it is also possible to implement Web Forms with screens and Web APIs.


2022-09-30 19:22

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.