Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Converted to SPA from MPA, lost WebAPI Controllers #4740


User avatar
0
OriAssurant created

Hi,

When we were using the SPA (MVC & jQuery) we had access to a WebAPI Controller.

When we migrated (mostly everything) to SPA solution, everything works and builds, except now we can't hit the custom controller we built in the WebAPI proj.

This is the error from hitting the Controller w/valid input: {"message":"An error has occurred."}

Here is what it looks like, more or less:

public class nameOfController : MajesticApiControllerBase
    {
        public nameOfController()
        {
        }

        [HttpGet, ActionName("CheckIfSIM")]
        public IHttpActionResult nameOfController(string value)
        {
        }
}

I also want to mention that it vanished from Swagger.

Thanks for the help.


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    @OriAssurant your Controller definition seems fine. Do you have any error message in Logs.txt file ? You can find it under your Web project folder.