On Feb 5, 10:59Â*pm, "Alexey Smirnov" <alexey.smir...@gmail.comwrote:
On Feb 5, 8:37Â*pm, "Vai2000" <nos...@microsoft.comwrote:
Hi All, I have a website site (asp.net 2.0) which welcomes both anonymous
and logged in users. I am doing some eCommerce operations in the website.
For the logged in users I take use of the Profile and UniqueID for doing the
transaction for their orders, what should I do for anonymous users?
How can I allow anonymous users to login at a certain point during the
checkout process and retrieve their profile?
For example: use Form authentication, make eCommerce using Session and
check on Checkout form
if (System.Web.HttpContext.Current.User.Identity.IsAu thenticated)
{
Â* Â* .... checkout ....} else {
Â* Â* Resonse.Redirect("login.aspx");
}- Hide quoted text -
- Show quoted text -
Or, it can be done in Web.config (I think it's better):
<location path="Checkout.aspx">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>
<system.web>
<authentication mode="Forms">
<forms name="eCommerce" loginUrl="login.aspx" protection="All"
path="/" />
</authentication>
</system.web>
You will need login.aspx to login the user