web.config设置Cookies过期时间
2008-03-11 09:11
330 查看
写法:
代码配合web.config的写法,
代码中写直接用 :FormsAuthentication.SetAuthCookie(gUserId, true);//gUserId登陆id
如果用这种写法,需在config中进行相应配置,配置如下:
<authentication mode="Forms">
<forms name=".DeskTopUser" protection="All" timeout="90" loginUrl="login.aspx" path="/" defaultUrl="EmployeEditList.aspx"/>
</authentication>
timeOut所表示的时间是过期时间,以分钟为单位
代码配合web.config的写法,
代码中写直接用 :FormsAuthentication.SetAuthCookie(gUserId, true);//gUserId登陆id
如果用这种写法,需在config中进行相应配置,配置如下:
<authentication mode="Forms">
<forms name=".DeskTopUser" protection="All" timeout="90" loginUrl="login.aspx" path="/" defaultUrl="EmployeEditList.aspx"/>
</authentication>
timeOut所表示的时间是过期时间,以分钟为单位
相关文章推荐
- asp.net webconfig session 过期时间设置
- asp.net web.config 设置Session过期时间
- Web.Config设置Session过期时间
- C# asp.net IIS 在web.config和IIS中设置Session过期时间
- 在web.config和IIS中设置Session过期时间
- C# asp.net IIS 在web.config和IIS中设置Session过期时间
- 在web.config和IIS中设置Session过期时间
- asp.net web.config 设置Session过期时间
- C# asp.net IIS 在web.config和IIS中设置Session过期时间
- C# asp.net IIS 在web.config和IIS中设置Session过期时间
- asp.net web.config 设置Session过期时间
- web.config配置文件设置Session的过期时间
- Cookies 不设置过期时间
- Angularjs中设置cookies的过期时间
- asp设置cookies的过期时间
- 关于jQuery的cookies插件2.2.0版设置过期时间的说明
- 关于jQuery的cookies插件2.2.0版设置过期时间的说明
- Asp操作Cookies(设置[赋值]、读取、删除[设置过期时间])
- jquery设置cookie过期时间与检查cookies是否可用
- 动态设置Cookies过期时间