Microsoft Developer Network > Forums Home > Commerce Server Forums > Commerce Server 2009 > Customer must first login before browsing in the webshop
Ask a questionAsk a question
 

Proposed AnswerCustomer must first login before browsing in the webshop

  • Wednesday, November 04, 2009 10:06 AMstefan_br Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hello,

    We want customers to login before they enter the webshop. So anonymous customers cannot browse in the webshop, only if they are an registered customer. The first page that we want to show is the login page. What is the best way to do this?

    Thanks
    Stefan

All Replies

  • Wednesday, November 04, 2009 12:38 PMRavi Kanth KoppalaMVPUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Is it ASP.NET or MOSS website. If it is ASP.NET, then the best way to control is through web.config by forcing users to authenticate before they see the secure pages.

    Regards,
    -Ravi Kanth Koppala
    http://techblog.ravikanth.net (If this post answers your question - Either Mark this post as the answer or vote as being useful.)
  • Wednesday, November 04, 2009 2:54 PMstefan_br Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    No it is a WSS website. 

    Regards,
    Stefan 
  • Wednesday, November 04, 2009 5:29 PMMatt Furnari Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Proposed AnswerHas Code
    Open the web.config for your site. You need to deny access to the folder or files for anonymous users:

    	<location path="Products">
    		<system.web>
    			<authorization>
    				<deny users="?"/>
    			</authorization>
    		</system.web>
    	</location>
    
    Check out the authorization element in MSDN for more info on controlling access to specific portions of your web application.


    Good Luck,
    Matt Furnari
    • Proposed As Answer byMatt Furnari Thursday, November 05, 2009 4:43 PM
    •