lightswitch HTMLClient 2013 - Removing AspNetMembershipProvider membership default provider web.config entry reappears after publishing. RRS feed

  • Question

  • Hi,

       I am using SimpleMembership in my LS app. I don't need the AspNetMembershipProvider  provider now.

       When I comment out or remove the following from my web.config, it gets added back in during publishing?  Not sure what triggers that?


        <membership defaultProvider="AspNetMembershipProvider">

            <clear />
            <add name="AspNetMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="_IntrinsicData" applicationName="MbsaFitnessLog" requiresUniqueEmail="false" requiresQuestionAndAnswer="false" />



        <roleManager enabled="True" defaultProvider="AspNetRoleProvider">


            <clear />

            <add name="AspNetRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="_IntrinsicData" applicationName="MbsaFitnessLog" />



        <profile enabled="True" defaultProvider="AspNetProfileProvider">


            <clear />

            <add name="AspNetProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="_IntrinsicData" applicationName="MbsaFitnessLog" />



            <add name="FullName" />





    Monday, December 1, 2014 6:24 PM

All replies

  • this file is created by the publish
    Tuesday, December 2, 2014 9:35 AM
  • Hi,

    To use membership, you must first configure it for your site.You configure the membership system in your application's Web.config file.

    If you don't have membership in webconfig and publish the site using publishing tool,it will creates the configuration for you.

    Learn more about this configuration in web.config,please see:


    Best Regards,

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, December 3, 2014 5:39 AM
  • Thanks Qimin and pfflio,
       To describe my scenario further, I am using SimpleMembership, so I don't need  AspNetMembershipProvider.  
       Is there anyway to comment this AspNetMembershipProvider  out so that it does not get added back in during publishing? because when it gets added back, my login looks in the AspNetMembershipProvider tables and not the SimpleMembership tables, and I have to comment out the AspNetMembershipProvider secion over again after each publish.         thanks again!


    Wednesday, December 3, 2014 11:32 AM
  • you shoul check if you have delete all codes related to AspNetMembershipProvider  .

    Thursday, December 4, 2014 9:01 AM
  • thanks Pdasg,

        After searching for "AspNetMembershipProvider" through the whole solution, the only place I have it is in my web.config. is there something else I should search for? Or somewhere else I should look?




    Saturday, December 6, 2014 2:19 PM
  • you can replace web.config by add a new one
    Tuesday, December 16, 2014 2:22 AM
  • Hi ewjare,

       I think that by publishing a NEW LS project to my local server does that. Even with this, when I look at the web.config after, the "AspNetMembershipProvider"  provider section is added back in to the solution version of the web.config.

    Just not sure what is causing this.



    Tuesday, December 16, 2014 4:14 PM