Make one page publicly available w/ Registered Users Only

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
jguengerich
Commodore (COMO)
Commodore (COMO)
Posts: 436
Joined: Tue May 07, 2013 1:59 pm

Make one page publicly available w/ Registered Users Only

Post by jguengerich » Wed Jun 22, 2016 6:11 am

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?
Jay

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Make one page publicly available w/ Registered Users Only

Post by mazhar » Wed Jun 22, 2016 4:58 pm

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.

jguengerich
Commodore (COMO)
Commodore (COMO)
Posts: 436
Joined: Tue May 07, 2013 1:59 pm

Re: Make one page publicly available w/ Registered Users Only

Post by jguengerich » Thu Jun 23, 2016 8:53 am

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.
Jay

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Make one page publicly available w/ Registered Users Only

Post by mazhar » Thu Jun 23, 2016 5:16 pm

Glad that you made it work.

Post Reply