if you were coming from FormBase.aspx to login.aspx, how could you get to default.aspx? how did you do your redirection after authentication?if you want to go to FormBase.aspx specifically in login.aspx, use
Response.Redirect("FormBase.aspx");

解决方案 »

  1.   

    你好,我有两个页面,登录页面(login.aspx)和需认证页面(FormBase.aspx).在登录页面点击登录按钮时,无法进入需认证页面。强行进入FormBase.aspx,点击注销按钮可进入login.aspx,之后也可进入FormBase.aspx。即第一次运行时,无法找到参数ReturnURL(FormBase.aspx注销时还回的)FormBase.aspx,而自动寻找页面default.aspx。加入代码Response.Redirect("FormBase.aspx");时程序不运行。请教是何原因。
      

  2.   

    try to modify your web.config:<configuration><!--- Forms authentication is required for all pages as a default --><system.web>
       <authentication mode="Forms">
            <forms name=".theDefault" 
                   loginUrl="~/login.aspx" 
                   path="/" 
                   protection="All" 
                   timeout="15" >
            </forms>
       </authentication>
      <authorization>
          <deny users="?" />
      </authorization>
    </system.web><location path="FormBase.aspx">
      <system.web>
          <authorization>
              <allow users="*" />
          </authorization>
      </system.web>
    </location></configuration>
      

  3.   

    saucer,你好,感谢你的及时回复,这几天实验室很忙,我的问题还没有解决,现在准备过国庆回老家,祝你节日快乐。