So there's a News reminder Component in my website and from Apex class method the records from Member object are fetched and displayed on cards. The functionality works fine in LWC Builder but when i publish the site, the component is not visible, at console there is an error logged for status 400 which is -> {"error":[{"message":"You do not have access to the Apex class named 'ProfileController'."}]}
here ProfileController is my apex class name. What actions need to be performed to resolve this ?


2 Answers 2


You'll need to make sure that the User has access to the Apex Class. Here's the Salesforce documentation on adding Apex Class Access to Permission Sets: https://help.salesforce.com/s/articleView?id=sf.perm_sets_setting_apex_access.htm&type=5

You'll then need to ensure the Permission Set is assigned to the User: https://help.salesforce.com/s/articleView?id=sf.perm_sets_assigning.htm&type=5

You can also add the Apex Class Access directly to the User's Profile, if you prefer.

EDIT: Actually, it sounds like you might be trying to add this permission to the guest user profile of an Experience Cloud site, which can be more difficult to find. Here's the documentation on navigating to the guest user profile of your site: https://help.salesforce.com/s/articleView?id=sf.rss_config_guest_user_profile.htm&type=5

Once there, the directions are similar to adding the permission to a Permission Set. Find "Apex Class Access" and add the desired class to the available classes.


To set the public access settings for your site:

  • From Setup, enter Sites in the Quick Find box, then select Sites.
  • Click the name of the site you want to control.
  • Click Public Access Settings to open the Profile page for your site profile.

This page includes all the functionality for viewing and editing profile permissions and settings, but you can't clone or delete the profile.

In the site profile, you can:

  • Enable Apex controllers and methods for your site. Controllers and methods that are already associated with your site's Visualforce pages are enabled by default.
  • Control the visibility of custom apps. If you want to expose a custom app and its associated tabs to public users, make only that app visible and make it the default to avoid exposing other pages. If any of your site pages use standard Salesforce headers, other visible applications may be seen by public users.
  • Set the login hours during which users can access the site.
  • Restrict the IP address ranges from which you can access the site. Note
  • Set the object permissions for your site. You can grant “Read” and “Create” permissions on all standard objects except products, price books, and ideas; and “Read,” “Create,” “Edit,” and “Delete” on all custom objects. All permissions that aren't set by default must be set manually. Warning

Refer to this documentation: https://help.salesforce.com/s/articleView?id=sf.sites_public_access_settings.htm&type=5


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .