当前位置:编程学习 > C#/ASP.NET >>

求如何写web.config中的form验证

现在的web.config的form验证   
<authentication mode="Forms">
      <forms defaultUrl="~/FrontUser/Index.aspx" loginUrl="~/FrontUser/Default.aspx" name=".ASPXFRONT" requireSSL="false"/>
</authentication>
FrontUser/Default.aspx页面登录正常

但是现在想增加另一个登录页面FrontUser/Login.aspx,是从别的入口经过这个页面登录,请问怎么办,
还是别的问题 --------------------编程问答-------------------- UPUPUPPUPUPUPPPUPUU --------------------编程问答-------------------- 重定向下呢,哈哈^^^^ --------------------编程问答-------------------- http://blog.csdn.net/Jelly_tracy/archive/2009/12/03/4932116.aspx --------------------编程问答-------------------- <?xml version="1.0" encoding="utf-8"?>
<!-- 
    注意: 除了手动编辑此文件以外,您还可以使用 
    Web 管理工具来配置应用程序的设置。可以使用 Visual Studio 中的
     “网站”->“Asp.Net 配置”选项。
    设置和注释的完整列表在 
    machine.config.comments 中,该文件通常位于 
    \Windows\Microsoft.Net\Framework\v2.x\Config 中
-->
<configuration>
    <appSettings/>
<connectionStrings>
<add name="CMS_ConnectionString" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\CMS_ANDYWEB.mdb" providerName="System.Data.OleDb"/>
</connectionStrings>
    <system.web>
        <!-- 
            设置 compilation debug="true" 将调试符号插入
            已编译的页面中。但由于这会 
            影响性能,因此只在开发过程中将此值 
            设置为 true。
        -->
        <compilation debug="true" />
        <!--
            通过 <authentication> 节可以配置 ASP.NET 使用的 
            安全身份验证模式,
            以标识传入的用户。 
        -->
<authentication mode="Forms">
<forms name=".manageuser" loginUrl="webmanage/login.aspx" defaultUrl="webmanage/default.aspx" protection="All" timeout="30"></forms>
</authentication>
<authorization>
<allow users="*"/>
</authorization>
        <!--
            如果在执行请求的过程中出现未处理的错误,
            则通过 <customErrors> 节可以配置相应的处理步骤。具体说来,
            开发人员通过该节可以配置
            要显示的 html 错误页
            以代替错误堆栈跟踪。

        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
        -->
</system.web>
<location path="webmanage">
<system.web>
<authorization>
<deny users="?"/>
<allow users="*"/>
</authorization>
</system.web>
</location>
</configuration> --------------------编程问答--------------------
<?xml version="1.0" encoding="utf-8"?>
<!-- 
    注意: 除了手动编辑此文件以外,您还可以使用 
    Web 管理工具来配置应用程序的设置。可以使用 Visual Studio 中的
     “网站”->“Asp.Net 配置”选项。
    设置和注释的完整列表在 
    machine.config.comments 中,该文件通常位于 
    \Windows\Microsoft.Net\Framework\v2.x\Config 中
-->
<configuration>
    <appSettings/>
<connectionStrings>
<add name="CMS_ConnectionString" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\CMS_ANDYWEB.mdb" providerName="System.Data.OleDb"/>
</connectionStrings>
    <system.web>
        <!-- 
            设置 compilation debug="true" 将调试符号插入
            已编译的页面中。但由于这会 
            影响性能,因此只在开发过程中将此值 
            设置为 true。
        -->
        <compilation debug="true" />
        <!--
            通过 <authentication> 节可以配置 ASP.NET 使用的 
            安全身份验证模式,
            以标识传入的用户。 
        -->
<authentication mode="Forms">
<forms name=".manageuser" loginUrl="webmanage/login.aspx" defaultUrl="webmanage/default.aspx" protection="All" timeout="30"></forms>
</authentication>
<authorization>
<allow users="*"/>
</authorization>
        <!--
            如果在执行请求的过程中出现未处理的错误,
            则通过 <customErrors> 节可以配置相应的处理步骤。具体说来,
            开发人员通过该节可以配置
            要显示的 html 错误页
            以代替错误堆栈跟踪。

        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
        -->
</system.web>
<location path="webmanage">
<system.web>
<authorization>
<deny users="?"/>
<allow users="*"/>
</authorization>
</system.web>
</location>
</configuration>
--------------------编程问答--------------------
引用 5 楼 andrewsway 的回复:
XML code
<?xml version="1.0" encoding="utf-8"?>
<!-- 
    注意: 除了手动编辑此文件以外,您还可以使用 
    Web 管理工具来配置应用程序的设置。可以使用 Visual Studio 中的
     “网站”->“Asp.Net 配置”选项。
    设置和注释的完整列表在 
    machine.config.com……

...就是这样的啊! --------------------编程问答-------------------- 帮顶+学习
补充:.NET技术 ,  ASP.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,