none
ASP.net MVC 4 : Custom Role & Membership Provider (cannot deploy) RRS feed

  • Discussion générale

  • Hello,

    I'm the author of innovacall ASP.net MVC 4 Open Source Framework available in code plex at : http://innovacallframework.codeplex.com (Demo portal available at : http://framework.innovacall.net)

    I'm preparing the Azure version of this framework and I have a problem with my custom role & membership provider.

    I started with the open source role & membership provider for entity framework because I thank it was usefull to link user account to production database to isolate user data and avoid to duplicate role & membership account in the production database.

    Under classic IIS, I use aspnet_regsql to prepare my database with necessary tables and stored procedures for standard Role & Membership provider.

    Then I can use a unique connexion to manage production data and role & membership.

    I my web.config, I have :

        <membership defaultProvider="EFMembershipProvider" userIsOnlineTimeWindow="15">
          <providers>
            <add name="EFMembershipProvider" type="InnovaApp.Layers.SecurityLayer.RoleAndMembershipProvider.Security.EFMembershipProvider, InnovaApp_SecurityLayer, Version=4.0.0.0, Culture=neutral" connectionStringName="InnovaAppEntities" enablePasswordRetrieval="true" enablePasswordReset="true" requiresQuestionAndAnswer="false" writeExceptionsToEventLog="true" />
          </providers>
        </membership>
        <profile enabled="false" defaultProvider="EFProfileProvider" inherits="InnovaApp.Layers.SecurityLayer.RoleAndMembershipProvider.Profile.EFProfileProvider" automaticSaveEnabled="true">
          <providers>
            <add name="EFProfileProvider" type="InnovaApp.Layers.SecurityLayer.RoleAndMembershipProvider.Profile.EFProfileProvider,InnovaApp_SecurityLayer, Version=4.0.0.0, Culture=neutral" connectionStringName="InnovaAppEntities" />
          </providers>
        </profile>
        <roleManager enabled="true" defaultProvider="EFRoleProvider">
          <providers>
            <add name="EFRoleProvider" type="InnovaApp.Layers.SecurityLayer.RoleAndMembershipProvider.Security.EFRoleProvider, InnovaApp_SecurityLayer, Version=4.0.0.0, Culture=neutral" connectionStringName="InnovaAppEntities" />
          </providers>
        </roleManager>
        <machineKey validationKey="C50B3C89CB21F4F1422FF158A5B42D0E8DB8CB5CDA1742572A487D9401E3400267682B202B746511891C1BAF47F8D25C07F6C39A104696DB51F17C529AD3CABE" decryptionKey="8A9BE8FD67AF6979E7D20198CFEA50DD3D3799C77AF2B72F" validation="SHA1" />
        <sessionState mode="InProc" customProvider="DefaultSessionProvider">
          <providers>
            <add name="DefaultSessionProvider" type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="InnovaAppEntities" />
          </providers>
        </sessionState>
    

    When I try to deploy this in Azure, I have an error. The website is not published (A problem of rôle).

    Can you tell me if we can use a custom role and membership provider in Azure ?

    If yes, what I have to do for the deployment to work ?

    Thanks for your answers,

    Best regards,

    Laurent

    dimanche 16 septembre 2012 19:57

Toutes les réponses

  • Hi,

    Is your project running locally?

    If yes, could you show me the code and start WebRole code that inherits SqlMembershipProvider ?
    Can you show me the ServiceDefinition file that your upload ?

    Thanks.

    vendredi 25 janvier 2013 18:35
  • Hello,

    Thanks to participate... I'm currently working on a major release of my cms (myprettycms.codeplex.com) and my framework (for regular servers).

    This question is old, so I have to re-open my project.

    Let me one or two days...

    I'll come back to you

    Best regards,

    Laurent

    vendredi 25 janvier 2013 18:45