Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 4 of 4

Thread: require customer login to view store

  1. #1
    trayhumphrey is offline Junior Member
    Join Date
    May 2011
    Posts
    8

    Default require customer login to view store

    I found the manual page, Force Customers to Login Before Viewing the Site. I did all that, and it leaves a bit to be desired. The resulting signin.aspx page that I'm redirected to has no CSS, no master page access, just the basic text.

    I could allow access to the skin's master page in the web.config, but then the user has browse links. Is there just a stand-alone sign-in page I can use, or do I have to create my own?

    Thanks,
    Ray

  2. #2
    cjbarth is offline Senior Member
    Join Date
    Oct 2008
    Posts
    392

    Default

    I have that set on my site, and I'm not seeing any of what you're describing. What version are you on?
    ML9.3.1.1
    SQL 2012 Express
    VS 2010
    Azure VM

  3. #3
    trayhumphrey is offline Junior Member
    Join Date
    May 2011
    Posts
    8

    Default

    Hi and thanks for your response. You sent me back to check on things and the problem has cleared up. Maybe my CSS file wasn't refreshed. Or maybe I added the <location> exceptions in the web.config and never tested properly. I did have to make exceptions for the App_Templates/{skin} and the App_Themes/{skin} folders.

    Anyway, <stupidProgrammerError>

    Thanks,
    Ray

  4. #4
    trayhumphrey is offline Junior Member
    Join Date
    May 2011
    Posts
    8

    Default restricting login: my solution

    I had an email request for how I solved this, so I decided to post here for the general community as well.

    I made all the changes in web.config. I disabled anonymous access to the site:
    <authorization>
    <deny users="?" />
    </authorization>

    Then I added exceptions for App_Templates/Skin_, AppThemes_Skin1, images, signing.aspx, lostpassword.aspx, and admin/signin.aspx:
    <location path="App_Templates/Skin_1">
    <system.web>
    <authorization>
    <allow users="*" />
    </authorization>
    </system.web>
    </location>

    That's been working pretty well for me. If anonymous is disabled for the whole site, .NET will automatically redirect to the login page specified:
    <authentication mode="Forms">
    <forms name="ASPDNSFGUID" loginUrl="SignIn.aspx" />
    </authentication>

    Cheers,
    Ray