Custom REST endpoint returning 404 in 7.6

Developer Space

Developer Space
Want to extend the Telligent Evolution platform? Collaborate with other developers and product experts here.

Custom REST endpoint returning 404 in 7.6

This question is answered

I created some custom REST endpoints in Telligent Community 6. These were working fine on version 6, but now that I have upgraded to Telligent Community 7.6 I get the following error message:

The remote server returned an error: (404) Not Found.

Having checked the exception reports I get api.ashx not found.

Any one have custom REST end points running on Telligent 7.6?

Verified Answer
  • Tracked this down with Telligent Support. My code had the following custom header:

    webClient.Headers.Add("Rest-Method", "LIST");

    This was used in version 6, but is no longer required in 7.

All Replies
  • From what I saw at Big Social 7.0 introduces a new Plugin Interface for REST endpoints:

    telligent.com/.../31496.irestendpoints-plugin-type.aspx

    I am not sure the process of migrating your 6.0 endpoints to 7.6 though

  • Sorry I forgot to add internal calls to the REST endpoint work. So calls from Velocity are fine, but external calls from our mobile application as failing with the error above.

  • Full error message:

    Path: /api.ashx/v2/events.json?PageIndex=1&PageSize=50&Sort=Date as HTTP GET

    Referrer:

    Message: The file '/api.ashx' does not exist.

    System.Web.HttpException (0x80004005): The file '/api.ashx' does not exist.

    at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)

    at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)

    at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean ensureIsUpToDate)

    at System.Web.UI.SimpleHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)

    at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

    at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

  • In version 6, custom rest endpoints have to be registered in the ~\Modules\RestModule.config file.  In the upgrade to 7.x, this file would have been replaced.  Can you confirm that you have re-applied the registrations after upgrading to 7.

  • Hi Alex,
     
    I’ve moved my endpoints in to the new file as part of the upgrade process. Currently working with David Hedges on that.
     
    Thanks,
  • Tracked this down with Telligent Support. My code had the following custom header:

    webClient.Headers.Add("Rest-Method", "LIST");

    This was used in version 6, but is no longer required in 7.