Click here to Skip to main content
15,894,106 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am creating Forgot Password Page for that i will write Some code in web.config file as follows, in that i am getting this error "Unrecognized configuration section membership"
Please anybody help me.


XML
<system.net>
  <mailSettings>
    <smtp deliveryMethod="Network" from="k*********a@gmail.com">
      <network host="100.33.1.1" port="25"/>
    </smtp>
  </mailSettings>
</system.net>
<membership>
  <providers>
    <clear/>
    <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="dbconnection" applicationName="SampleApplication"/>
  </providers>
</membership>
<profile>
  <providers>
    <clear/>
    <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="dbconnection" applicationName="SampleApplication"/>
  </providers>
</profile>
<roleManager enabled="true">

</roleManager>
Posted
Updated 15-Jul-12 22:17pm
v4

1 solution

Authentication, Authorization, Membership Provider, Role Provider and Profile Provider Settings are directly available in the web.config file if you have created the ASP.NET application by using the Visual Studio 2010.

Based on the error, it looks like they are placed inside some other tag.

Make sure they are directly at root level in Web.Config and not under any other tag. Refer this article on details about the tags and what all can be passed to them: Web.config File - ASP.NET[^]

BTW, visual studio's intellisense in web.Config too will help you out in seeing on what all are available and at what level.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900