Membership Settings!

  • Thread starter Thread starter Vai2000
  • Start date Start date
V

Vai2000

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?

Any suggestions?

TIA
 
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.IsAuthenticated)
{
.... checkout ....
} else {
Resonse.Redirect("login.aspx");
}
 
For example: use Form authentication, make eCommerce using Session and
check on Checkout form

if (System.Web.HttpContext.Current.User.Identity.IsAuthenticated)
{
    .... 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
 
There is a specific class and methods to migrate an anonymous user once they
get logged in but I don't recall much more and suggest googling...

FormsAuthentification.RedirectFromLoginPage?
 
Back
Top