You need to sign in to do that
Don't have an account?

Visualforce page suddenly requires authorisation
Hi there, I have been developing a VisualForce page for a client, accessed via their 'Sites' site. I had initially set this up and it was working fine, however today I made a change and when I tried to access the page to check the change, it told me I had to login.
The page was setup for public access with no auth required, and was working as such. I've checked all permissions, and they are as they were. I haven't changed the code to access any objects that I wasn't accessing before, and the read permissions are there for the objects I am accessing.
I'm totally stuck as to know what to do next!! Any help appreciated :)
Regards, Ben
Problem solved - it was a bug. I had this in my page code:
<apex:outputText value="{0,number,#,###.##}"><apex:param value="{!price}"/></apex:outputText>
But the result of getPrice() was a string. The incorrect conversion was causing the page to display the Unathorized page - a little odd that it didn't display the Exception page since this is what's configured, but I'll leave that for another day!
Cheers, Ben
All Answers
Problem solved - it was a bug. I had this in my page code:
<apex:outputText value="{0,number,#,###.##}"><apex:param value="{!price}"/></apex:outputText>
But the result of getPrice() was a string. The incorrect conversion was causing the page to display the Unathorized page - a little odd that it didn't display the Exception page since this is what's configured, but I'll leave that for another day!
Cheers, Ben
Hi Ben,
I was wondering if you could share how it is that you set up a visualforce page for public access? Sorry, i am somewhat new to salesforce.
Thank you!
Hi Bulent,
After following Chapter 14, I can open an application page and create new records if I am logged in. If I am not, the system response is:
"Authorization Required
You must first log in or register before accessing this page.
If you have forgotten your password, click Forgot Password to reset it."
What has to be changed to avoid the need for login? Is writing the custom controller instead of standard controller extension the only option?
nothing is changed to cause this. You might want to check the related FLS, object access etc. Summer'10 you'll be able to use the "Preview as Admin" feature to see the details behind these kind of errors easily.
Thanks, Bulent. Will wait.
But yet, generally, is standard controller extension running in system mode? And what does FLS stand for?
Thanks again.
no they don't run in system mode. so you need to check you sharing setup to make sure your site has access to the records that you are planning to show.
FLS= Field Level Security
Thank you much, Bulent. It will keep me running for a while.
Best regards,