I've going through the sample tutorial provided in the Virtocommerce documentation.
http://docs.virtocommerce.com/display/vc2devguide/Creating+new+module
I'm using the exact code from the following location provided in the documentation
I have most of the code running but I keep getting a 404 error with the WebAPI sample for the module.
I have the Virtocommerce code running as an application under my default website on my local dev machine.
I feel like the issue is probably in my API controller. Here is my code
using System.Web.Http;
namespace VirtoCommerce.Module1.Web.Controllers.Api
{
[RoutePrefix("api/module1")]
public class Module1Controller : ApiController
{
// GET: api/module1/
[HttpGet]
public IHttpActionResult GetData()
{
return Ok(new[] { "Hello world!" });
}
}
}
What is a good way to debug this 404 error?
The GetData() method should also have the [Route("")] attribute:
[HttpGet]
[Route("")]
public IHttpActionResult GetData()
{
return Ok(new[] { "Hello world!" });
}