403 - IIS 10.0 Detailed Error - 403.0 - Access to non-SSP API is denied for portal users
Hello community,
I am trying to implement a service for portal and system users using the documentation in https://academy.creatio.com/docs/8-0/developer/application_components/portal/self_service_portal/overview
The service has the following code:
using Terrasoft.Web.Common;
using Terrasoft.Web.Common.ServiceRouting;
[ServiceContract]
[DefaultServiceRoute]
[SspServiceRoute]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
public class Service1 : BaseService
{
//Code
}For system users the service works fine but when I try to access the service from postman authenticated as a portal user I get the following message : "IS 10.0 Detailed Error - 403.0 - Access to non-SSP API is denied for portal users" with 403 status code. Is something that I am missing in the service implementation or in web.config?
Like
Hello!
Ensure that you add the /ssp prefix to the route when making a request as a portal user.
A feature called "EnableCustomPrefixRouteApi" enables web services custom routing and restricts SSP user access services without the /ssp prefix.
In order to enable it you need to run the following script in the database:
INSERT INTO AdminUnitFeatureState (SysAdminUnitId,FeatureState,FeatureId)
VALUES ('720B771C-E7A7-4F31-9CFB-52CD21C3739F',1,'17ED5BE9-CA87-42A4-A761-3466DBABF925')
Another feature called "UsePortalDataService" divides services into the portal and non-portal ones. To enable it run the following script:
INSERT INTO AdminUnitFeatureState (id, SysAdminUnitId, FeatureState, FeatureId)
VALUES (newid(), '720B771C-E7A7-4F31-9CFB-52CD21C3739F', 1, '45D7102E-42D5-4E61-ADF8-77F00CD2F3E8')
So make sure you are using the /ssp prefix and both features are active in the system.
Best regards,
Max.