NopCommerce and MVC 2 - Membership Provider

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
Hi,
I am trying to connect to the membership tables provided by nopCommerce via MVC 2 Membership Provider configurations. Since nopCommerce does not use the standard aspnet_Users, aspnet_Membership, etc. tables for authorization, how would you mesh these two in order to integrate the MVC 2 [Authorize] functionality to connect to the nopCommerce membership framework?

Thanks in advance,
~Nathan
12 years ago
nathantj wrote:
Hi,
I am trying to connect to the membership tables provided by nopCommerce via MVC 2 Membership Provider configurations. Since nopCommerce does not use the standard aspnet_Users, aspnet_Membership, etc. tables for authorization, how would you mesh these two in order to integrate the MVC 2 [Authorize] functionality to connect to the nopCommerce membership framework?

Thanks in advance,
~Nathan


Hi Nathan,

What version of nopCommerce are you using? Can you give an example of what you're trying to do? The nopCommerce team has built out some functionality for restricting users.
12 years ago
I am using version 1.90
I am trying to use the AccountController and built in membership framework of MVC 2 to interface with the nopCommerce  membership framework. I have not found a solution for this as it might be a long shot.
Thanks,
~Nathan
12 years ago
nathantj wrote:
I am using version 1.90
I am trying to use the AccountController and built in membership framework of MVC 2 to interface with the nopCommerce  membership framework. I have not found a solution for this as it might be a long shot.
Thanks,
~Nathan


I downloaded 1.9 and looked at the web.config file. I bet you could change the web.config in your MVC application to use the providers below with little or no work required. Keep in mind that not all of the custom membership provider methods are implemented and you should review the classes before you try and expose functionality that might throw a NotImplementedException.


    <membership defaultProvider="NopMembershipSqlProvider" userIsOnlineTimeWindow="15">
      <providers>
        <add name="NopMembershipSqlProvider" type="NopSolutions.NopCommerce.BusinessLogic.Profile.StoreMembershipProvider, Nop.BusinessLogic" connectionStringName="NopSqlConnection" enablePasswordReset="true" requiresQuestionAndAnswer="false" applicationName="NopCommerce" requiresUniqueEmail="true" enablePasswordRetrieval="true"/>
      </providers>
    </membership>
    <roleManager enabled="true" cacheRolesInCookie="false" defaultProvider="NopRoleManagerSqlProvider" cookieName=".NopCommerceRoles" cookiePath="/" cookieTimeout="30" cookieRequireSSL="false" cookieSlidingExpiration="true" createPersistentCookie="false" cookieProtection="All">
      <providers>
        <add name="NopRoleManagerSqlProvider" type="NopSolutions.NopCommerce.BusinessLogic.Profile.StoreRoleProvider, Nop.BusinessLogic" connectionStringName="NopSqlConnection" applicationName="NopCommerce"/>
      </providers>
    </roleManager>
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.