6

I am facing a problem in making my visualforce page work on force.com(sites).

  1. Created a new visualforce page and it works fine when I click on preview button.
  2. Added the page to site.com and granted access to the user by clicking on the public access settings button on the site.
  3. When user logs into site(HTTPS protocol) and navigates to the Visualforce page created above it shows the error message saying "An error occured while loading the visualforce page". If I change https to http in the url it is working fine.

Question: so how do I make my visualforce work on HTTPS protocol on the site that I am adding to?? Please help me.

Below are relevant screenshots on what I am talking about:

Visualforce page:

enter image description here

Sites:

enter image description here

Site settings:

enter image description here

Site login settings:

enter image description here

  • have you added page access for site or guest user? – Ratan Paul Nov 25 '15 at 16:51
  • yes, I clicked on public access setings button on the site and added visualforce page. Actually it is working if i change https to http in the url but not working with https – javanoob Nov 25 '15 at 16:52
  • The URL for the secure version of the site typically includes secure in the host name where the non-secure version does not... does your app's misbehavior change if you include "secure" in your hostname? https://yoursite.secure.force.com/apex/pagename – Mark Pond Nov 26 '15 at 0:02
2

We have found some session issues when switching back and forth from http and https. So I suggest go all the way either way.

  1. Force https:
    • Check Require Secure Connections (HTTPS) on the Sites settings. enter image description here
    • Uncheck Require Non-Secure Connections (HTTP) on the Sites > Login Settings. enter image description here
  2. Remove all HTTPS:
    • Uncheck Require Secure Connections (HTTPS) on the Sites settings.
    • Check Require Non-Secure Connections (HTTP) on the Sites > Login Settings.
  • Thanks for that suggestion..I will try and post here the results. Thanks for your time. – javanoob Nov 25 '15 at 23:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.