<authentication mode="Forms" /> 
<authorization>变成下面的
<authentication mode="Forms" /> 
 <forms name="CommerceAuth" loginUrl="login.aspx" protection="All" path="/" />
<authorization>就出错了:Configuration Error 
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: Unrecognized configuration section 'forms'Source Error: 
Line 51: 
Line 52: 
Line 53:   <forms name="CommerceAuth" loginUrl="login.aspx" protection="All" path="/" />
Line 54: 
Line 55: 
 Source File: c:\inetpub\wwwroot\Rohs\web.config    Line: 53 

解决方案 »

  1.   

    <forms name="CommerceAuth" loginUrl="login.aspx" protection="All" path="/" ></forms>
      

  2.   

    好像没问题,应该是你改错了吧,
    <authentication mode="Forms" /> 
     <forms name="CommerceAuth" loginUrl="login.aspx" protection="All" path="/" />
    <authorization>
    应该改成:
    <authentication mode="Forms"> 
     <forms name="CommerceAuth" loginUrl="login.aspx" protection="All" path="/" />
    </authorization>
    主要是反斜杠的问题。
      

  3.   

    标签的问题,你的<authentication mode="Forms" /> 结束了,添加forms后一定得分成两个标签
    <authentication mode="Forms">和</authentication>
          <authentication mode="Forms">
             <forms name="CommerceAuth" loginUrl="login.aspx" protection="All" path="/">         </forms>
          </authentication>
      

  4.   

    <authentication mode="Forms" /> 
    <authorization>
    两者不是同一个标签,两个单词不一样!mousie也搞错了
    <forms>标签应该放在<authentication>中