Commerce Server General - CS 2007 and ASP.NET membership provider

This is Interesting: Free IT Magazines  
Home > Archive > Commerce Server General > August 2006 > CS 2007 and ASP.NET membership provider





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author CS 2007 and ASP.NET membership provider
Ashkan Daie

2006-07-13, 1:18 pm

Just downloaded and installed CS2007 Eval.

I have enabled the CS 2007 membership provider by adding the following to
the <system.web> section of the web.config:

<authentication mode="Forms" />


<membership defaultProvider="UpmProvider">

<providers>

<add name="UpmProvider"
type="Microsoft.CommerceServer.Runtime.Profiles.UpmMembershipProvider" />

</providers>

</membership>

I then added three pages to the project (Default.aspx, Register.aspx,
Login,aspx).

Default.aspx houses the LoginStatus control.
Register.aspx houses the CreateUserWizard control.
Login.aspx houses the Login control.

I can create a user in the profile system using the Register page (I see the
newly created user using the Customer and Orders Management tool)

I can log in with the newly created user using the Login page.

The problem is that the LoginStatus control always shows the "Log In" link
which means that the user is not authenticated. I have also check the value
of CommerceContext.Current.AuthenticationInfo.IsAuthenticated and it's
always returning false.

Any help would be appreciated.

Thanks,
Ashkan


David Hargis [MSFT]

2006-08-24, 7:20 pm


The LoginStatus control is actually looking at
HttpContext.Current.User.Identity.IsAuthenticated to determine if the user
is logged in or not. You may need to manually set this property after the
user logs in, or create you own control that inherrits from LoginStatus.
CommerceContext.Current.AuthenticationInfo.IsAuthenticated is only used by
the deprecated CSAuth authentication method.

- David

--------------------
From: "Ashkan Daie" <adaie@nospam.com>
Subject: CS 2007 and ASP.NET membership provider
Date: Wed, 12 Jul 2006 15:17:17 -0700
Lines: 42
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.3790.2663
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2663
X-RFC2646: Format=Flowed; Original
Message-ID: <#yDb2DgpGHA.516@TK2MSFTNGP05.phx.gbl>
Newsgroups:
microsoft.public.commerceserver.general,microsoft.public.commerceserver.sdk,
microsoft.public.commerceserver.userprofilemgt
NNTP-Posting-Host: 64.94.104.76
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSFTNGP05.phx.gbl
Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.commerceserver.sdk:3516
microsoft.public.commerceserver.userprofilemgt:3598
microsoft.public.commerceserver.general:18024
X-Tomcat-NG: microsoft.public.commerceserver.general

Just downloaded and installed CS2007 Eval.

I have enabled the CS 2007 membership provider by adding the following to
the <system.web> section of the web.config:

<authentication mode="Forms" />


<membership defaultProvider="UpmProvider">

<providers>

<add name="UpmProvider"
type="Microsoft.CommerceServer.Runtime.Profiles.UpmMembershipProvider" />

</providers>

</membership>

I then added three pages to the project (Default.aspx, Register.aspx,
Login,aspx).

Default.aspx houses the LoginStatus control.
Register.aspx houses the CreateUserWizard control.
Login.aspx houses the Login control.

I can create a user in the profile system using the Register page (I see
the
newly created user using the Customer and Orders Management tool)

I can log in with the newly created user using the Login page.

The problem is that the LoginStatus control always shows the "Log In" link
which means that the user is not authenticated. I have also check the value
of CommerceContext.Current.AuthenticationInfo.IsAuthenticated and it's
always returning false.

Any help would be appreciated.

Thanks,
Ashkan





--

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com