The membership provider only gets added if you select an Internet application from the template list when you first create the application. You can create a dummy Internet project and compare the results in web.config.
ScottGu blogged about clear
http://weblogs.asp.net/scottgu/archive/2006/11/20/common-gotcha-don-t-forget-to-clear-when-adding-providers.aspxBut note that there were changes in the provider for MVC4. You should read up on these changes.
>Hi everybody,
>
>Hopefully this is an easy question while I am doing some research in this area. I'm working on ASP.NET MVC 4 application. In my colleague's application which is written in plain ASP.NET (not MVC) I see the following section in web.config
>
>
><membership defaultProvider="wwdllMembershipProvider" userIsOnlineTimeWindow="15">
> <providers>
> <add name="wwdllMembershipProvider" type="wwdllMembershipProvider" enablePasswordRetrieval="false" enablePasswordReset="false" writeExceptionsToEventLog="false"/>
> </providers>
> </membership>
> <profile>
> <providers>
> <clear/>
> <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>
> </providers>
> </profile>
> <roleManager enabled="false">
> <providers>
> <clear/>
> <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/"/>
> <add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/"/>
> </providers>
> </roleManager>
>
>
>
>First of all, what
<clear/ >
means here?
>
>Secondly, I see nothing in ASP.NET MVC 4 application in regards to membership provider in the web config. Do I still add it the same way in web config there or there is another way?
>
>Thanks in advance.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer