日期:2014-05-19  浏览次数:20826 次

C#中表单验证web.config文件
我的表单验证web。config是这么写的!
<configuration>
    <system.web>
        <authentication   mode= "Forms "/>
            <forms   name= "formauthentication "   loginUrl= "ch10ex2.aspx "
                                            protection= "All "   timeout= "60 ">
                    <credentials   passwordFormat= "Clear ">
                          <user   name= "yijiyong "   password= "19860306 ">
                          <user   name= "zhonglianyu "   password= "2005030611 ">
                          <user   name= "wangxiaojian "   password= "2005030599 ">
                    </credentials>
            </forms>
        </authentication>
    <machineKey   validationKey= "AutoGenerate "   decryptionKey= "AutoGenerate "
                                                                      validation= "SHA1 "/>
    <authorization>
              <deny   users= "? "/>
    </authorization>
    </system.web>
</configuration>

但是把相应的网页在IIS服务器浏览时,系统弹出
Parser   Error   Message:   Unrecognized   configuration   section   'forms '

Source   Error:  


Line   2:         <system.web>
Line   3:             <authentication   mode= "Forms "/>
Line   4:                 <forms   name= "formauthentication "   loginUrl= "ch10ex2.aspx "
Line   5:                                                 protection= "All "   timeout= "60 ">
Line   6:                         <credentials   passwordFormat= "Clear ">
 
希望大侠帮帮忙!其中保证ch10ex2.aspx没错!

------解决方案--------------------
厉害,自己把问题给解决了,是多了个反斜杠
------解决方案--------------------
LZ别白来一趟啊,散个分吧~
------解决方案--------------------
我要分阿