Dear All,
I'm integrating Able Commerce with an existing customers login system. What they'd like to be able to do is have users who've registered on one of their other websites to be able to log in to the store without having to register separately through Able Commerce.
To this end I've written a membership provider that inherits from AbleCommerceMembershipProvider. I've overridden all the methods with extensions where necessary interact with the external registration data. I've altered the web.config to change the default provider to my new one. The only problem I'm having now is my provider code doesn't seem to be called when a user logs in or registers via Able.
First up, I'd like to know if the above approach a sane one? If so, could somebody give me a clue as to why my provider isn't being called at the appropriate moment?
I'm starting to think maybe I should alter LoginDialog.ascx.cs instead.
Regards Giles.
Membership provider
-
- Ensign (ENS)
- Posts: 10
- Joined: Wed Nov 26, 2008 5:43 am
Re: Membership provider
Some more information:
I've altered the membership section in my web.config to the following:
<membership defaultProvider="NonExistentAbleMembershipProvider">
<providers>
<clear/>
<add name="CustomisedAbleMembershipProvider" connectionStringName="AbleCommerce6" applicationName="/" type="DataAccess.Controllers.CustomisedAbleMembershipProvider"/>
</providers>
</membership>
The default provider does not exist. The only provider I've listed is my new one. When I compile the website and login as a customer I would expect one of two things to happen
1. Be informed that the default provider doesn't exist.
2. Use my CustomisedAbleMembershipProvider class to access the alternate user database.
What actually happens is that Able Commerce logs me in without complaint using what is I assume to be AbleCommerceMembershipProvider.
I've altered the membership section in my web.config to the following:
<membership defaultProvider="NonExistentAbleMembershipProvider">
<providers>
<clear/>
<add name="CustomisedAbleMembershipProvider" connectionStringName="AbleCommerce6" applicationName="/" type="DataAccess.Controllers.CustomisedAbleMembershipProvider"/>
</providers>
</membership>
The default provider does not exist. The only provider I've listed is my new one. When I compile the website and login as a customer I would expect one of two things to happen
1. Be informed that the default provider doesn't exist.
2. Use my CustomisedAbleMembershipProvider class to access the alternate user database.
What actually happens is that Able Commerce logs me in without complaint using what is I assume to be AbleCommerceMembershipProvider.
-
- Ensign (ENS)
- Posts: 10
- Joined: Wed Nov 26, 2008 5:43 am
Re: Membership provider
I've sorted it. On the initial login, the membership provider is not called. It is called in many other places though, returning the expected results. So I've added some custom code to LoginDialog.ascx.cs to validate against my membership provider.
Re: Membership provider
I am trying to accomplish this same thing, but with the Affiliate Wiz application. I would like for Ablecommerce users to feel like they are within the same application when switching between Able and AffiliateWiz. The way it is set up now they have to re-login when switching between the two.
Please explain (in detail if you have time) how you created a membership provider that works with Able and another application. Thank you.
Please explain (in detail if you have time) how you created a membership provider that works with Able and another application. Thank you.
-
- Ensign (ENS)
- Posts: 10
- Joined: Wed Nov 26, 2008 5:43 am
Re: Membership provider
Dear Jwake7,
That isn't quite what I've done. Users of my application can't move transparently between Able Commerce and the website I've integrated with. They can sign in with the same login details though and get differential pricing based on their membership level on the other website.
If you're looking for a single sign on with transparent moving between the two websites you may be better off looking at this topic:
viewtopic.php?f=42&t=8080&p=34590&hilit ... der#p34590
Regards Giles.
That isn't quite what I've done. Users of my application can't move transparently between Able Commerce and the website I've integrated with. They can sign in with the same login details though and get differential pricing based on their membership level on the other website.
If you're looking for a single sign on with transparent moving between the two websites you may be better off looking at this topic:
viewtopic.php?f=42&t=8080&p=34590&hilit ... der#p34590
Regards Giles.