locked
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">
          <providers>

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

          </providers>

        </membership>

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

          <providers>

            <clear />

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

          </providers>

        </roleManager>

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

          <providers>

            <clear />

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

          </providers>

          <properties>

            <add name="FullName" />

          </properties>

        </profile>   

    -->


    david

    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:

    http://msdn.microsoft.com/en-us/library/system.web.security.membership.providers(v=vs.110).aspx

    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!


    david

    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?

    thanks

     


    david

    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.

    thanks


    david

    Tuesday, December 16, 2014 4:14 PM