Minimal Rest API example project for the new WiseJ-3 release and .NET 6.0 core


Hi support,

I am currently upgrading to WiseJ-3 and hence to .NET 6.0 core.

My application currently provides both UI and API server functionality.  So url/ returns the WiseJ SPA, whereas url/api routes to the API services.  The following snippet represents the working coal face:

using Newtonsoft.Json.Linq;
public class MainController : ApiController
[Route(“api/ping”)] [HttpGet] public JObject Ping() => JObject.Parse(“{Message: ‘” + HttpContext.Current.Request.HttpMethod + “‘}”);

This works in conjunction with Global.asax.cs: Application_Start {GlobalConfiguration.Configure(MainConfig.Register);} which in turn configures config.Routes.MapHttpRoute(routeTemplate: “api/{controller}/{id}”);

.NET 6.0 core no longer supports ApiController, so I have converted to AspNetCore.Mvc.ControllerBase.

.NET 6.0 core also no longer supports Global.asax.cs or GlobalConfiguration.Configure, and this is where I am stuck.  I cannot work out how to register correctly to utilise MainController for url/api/[etc].

Would you be able to supply a minimal example project for the new WiseJ-3 release and .NET 6.0 core that provides normal WiseJ UI (Page1.cs) on the root URL along with rest API services at /api/.

Many thanks in advance.

  • You must to post comments

Hi Neil

This kind of question sadly is outside of the scope of help that we provide in the forum.

This info can help you to go in the right direction

Also we can provide proffesional services for specific advanced request, in 4h support packages
Here the link for contact us

Professional Services Request

Thanks and regards

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.