Page 1 of 1
Make one page publicly available w/ Registered Users Only
Posted: Wed Jun 22, 2016 6:11 am
by jguengerich
In Gold R12, I would like to make a help page available without logging in, but I also would like to use the "Registered Users Only" mode for the General store setting Access Restriction.
I added this:
Code: Select all
<location path="Help.aspx">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
to the configuration section of web.config, but I still get redirected to the login page.
Is there any way to make this one page available without logging in?
Re: Make one page publicly available w/ Registered Users Only
Posted: Wed Jun 22, 2016 4:58 pm
by mazhar
Web.config change is being overridden by "Registered Users Only" mode. That mode only allows request to login page for anonymous users. You can try a trick by renaming your help page to something that ends with login.aspx. This will make the store mode enforcer believe request is coming for login and it won't restrict access. For example try renaming your Help.aspx to HelpNoLogin.aspx.
Re: Make one page publicly available w/ Registered Users Only
Posted: Thu Jun 23, 2016 8:53 am
by jguengerich
I have the source code; after a little digging, I was able to accomplish this by modifying the Track method of the PageTracker class. I created another boolean flag before line 94 that checks for my help file name in urlPath, then added it to the if(!is... && !is... [etc.]) statement. I changed my help file name to MyCompanyNameHelp.aspx to avoid including other pages that end in "help" in this new exception.
Re: Make one page publicly available w/ Registered Users Only
Posted: Thu Jun 23, 2016 5:16 pm
by mazhar
Glad that you made it work.