Page 1 of 1

Require login prior to viewing products?

Posted: Wed May 21, 2008 6:22 pm
by jaylichtman
Hello,

Is it possible to require a user to login (or register) before they see any products? In other words, a user may visit the site but they first thing they have to do is login or register.

Thanks,
Jay

Re: Require login prior to viewing products?

Posted: Fri May 23, 2008 5:44 pm
by Logan Rhodehamel
You can probably do this with some changes to the web.config file and the authorization element.

Open the /web.config file and look for this line:

Code: Select all

	<system.web>
Try adding some stuff around it:

Code: Select all

	<location path="Captcha.ashx">
		<system.web>
			<authorization>
				<allow users="*" />
			</authorization>
		</system.web>
	</location>	
	<system.web>
		<authorization>
			<deny users="?"/>
		</authorization>
Basically it says no anonymous users can access anything (except the captcha script).

Re: Require login prior to viewing products?

Posted: Tue May 27, 2008 10:19 am
by jaylichtman
Logan,

I'll give that a shot this week and post the results.

Thanks,
Jay

Re: Require login prior to viewing products?

Posted: Tue May 27, 2008 3:45 pm
by jaylichtman
Logan,

That appears to work perfectly - thank you very much.

Jay