Click here to Skip to main content
15,884,177 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am in my Web.config file and I am doing authentication mode. I have an error saying that, "The 'forms' attribute is not allowed. Why am I getting this error? How can i fix this safely? I also have over 5,000 users in a database. Is there a way for me to authenticate those users with out typing them all in the web.config file?

XML
<system.web>
        <compilation debug="true" targetFramework="4.0" />
      
      <authentication mode="Forms">
        <forms forms="401kApp" loginUrl="/Login.aspx" />
      </authentication>
      
    </system.web>


Here is what I have changed:

XML
<system.web>
        <compilation debug="true" targetFramework="4.0" />
      
      <authentication mode="Forms">
        <forms loginUrl="/Login.aspx" />
      </authentication>
      <membership defaultProvider="SqlProvider"
      userIsOnlineTimeWindow="15">
        <providers>
          <add
            name="SqlProvider"
            type="System.Web.Security.SqlMembershipProvider"
            connectionStringName="SqlServices"
            applicationName="SACSCOCLogin1.1"
            enablePasswordRetrieval="true"
            enablePasswordReset="true"
            requiresQuestionAndAnswer="false"
            requiresUniqueEmail="true"
            passwordFormat="Hashed"
            maxInvalidPasswordAttempts="5"
            passwordAttemptWindow="10" />
        </providers>
      </membership>
    </system.web>

</configuration>
Posted
Updated 26-Sep-13 6:00am
v4

1 solution

Answered only to remove from unanswered list: solved by OP
 
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