Response status:404 -> Custom Web Service on Customer Portal

Hi Team,

I'm calling the custom web-service on the Customer Portal to fetch the role of the currently logged-in user: <strong>UsrUserInfoService/GetCurrentUserInfo</strong>. But the request is responding with 404 - Page Not Found error.

However, this service works as expected on the Employee Portal with the following endpoint: https://my.creatio.com/0/rest/UsrUserInfoService/GetCurrentUserInfo

I observed that the Requested URL differs slightly due to the presence of an additional path segment <strong>ssp</strong>, as shown below: `https://my.creatio.com/0/ssp/rest/UsrUserInfoService/GetCurrentUserInfo`

 

Thank you in advance

 

Like 0

Like

3 comments
Best reply

Add these attributes to your service class: 

[DefaultServiceRoute]
[SspServiceRoute]

Ryan

Add these attributes to your service class: 

[DefaultServiceRoute]
[SspServiceRoute]

Ryan

Hi Ryan,

After adding attributes, still getting compilation error below:


I am providing you with source code of service:


using Terrasoft.Web.Common;

using System.Web;

using Terrasoft.Core.Factories;

using System;

using System.Data;

using System.Data.SqlClient;

using System.Collections.Generic;

using System.ServiceModel;

using System.ServiceModel.Web;

using System.ServiceModel.Activation;

using Newtonsoft.Json;

using Terrasoft.Core;

using Terrasoft.Core.DB;

using Terrasoft.Common;

using Terrasoft.Core.Entities;

namespace Terrasoft.Configuration.UsrUserInfoService

{

    [ServiceContract]

    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]

    [DefaultServiceRoute]

    [SspServiceRoute

    public class UsrUserInfoService : BaseService

    {

       [OperationContract]

        [WebInvoke(Method = "GET", UriTemplate = "GetCurrentUserInfo", ResponseFormat = WebMessageFormat.Json)]

        public string GetCurrentUserInfo()

        {

            // Fetching Current Logged-in User Role

        }

    }

}

souresh khandelwal,

Sorry, forgot to also mention to add these usings: 

using Terrasoft.Web.Common;
using Terrasoft.Web.Common.ServiceRouting;

Ryan

Show all comments