forms验证问题
如果我把登陆的首页,那么要验证才能进入的那个文件夹的web.config 怎么写? 问题点数:20、回复次数:7Top
1 楼hendry_huang(MISA)回复于 2005-09-22 12:30:12 得分 0
如果我把登陆放在首页,那么要验证才能进入的那个文件夹的web.config 怎么写?Top
2 楼kension()回复于 2005-09-22 12:48:09 得分 10
<authentication mode="Forms">
<forms name=".aspshow" loginUrl="login.aspx" timeout="30" protection="All"></forms>
</authentication>
如果没有登陆则返回登陆页面login.aspx
Top
3 楼hendry_huang(MISA)回复于 2005-09-22 12:59:24 得分 0
private void submit_Click(object sender, System.EventArgs e)
{
if ( FormsAuthentication.Authenticate(userid.Text,mima.Text ) )
{
FormsAuthentication.RedirectFromLoginPage(userid.Text,true);
Response.Redirect("./admin/admin.aspx");
}
else
{
JScript.Alert("请重新输入!");
}
}Top
4 楼hendry_huang(MISA)回复于 2005-09-22 12:59:56 得分 0
不能进去,也没有cookiesTop
5 楼sunnystar365(一个人的天空)回复于 2005-09-22 15:34:38 得分 10
<authentication mode="Forms">
<forms name="WorkLog" loginUrl="Login.aspx"></forms>
</authentication>
Top
6 楼hendry_huang(MISA)回复于 2005-09-22 16:08:43 得分 0
我加上web.config 系统就出错
Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
270106336(空心伞) 13:48:41
forms 验证的错误提示,什么意思????
119445519( 金 ) 13:46:42
好像说什么目录在IIS中不存在
270106336(空心伞) 13:50:40
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.
Top
7 楼kension()回复于 2005-09-23 13:02:43 得分 0
注意大小写!Top





