实现由web.config控制的验证
来源:互联网 发布:win8修改mac地址 编辑:程序博客网 时间:2024/05/20 00:15
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<authentication mode="Forms">
<forms name=".ASPXUSERDEMO" loginUrl="login.aspx" protection="All" timeout="60" />
</authentication>
<authorization>
<deny users="?" />
</authorization>
2.在login.aspx中如果用户名和密码正确则给予验证:
FormsAuthentication.SetAuthCookie(TextBox_name.Text,false); //在本页
FormsAuthentication.RedirectFromLoginPage(TextBox1.Text,false); //转到操作页
3.退出验证:
FormsAuthentication.SignOut();
4.获得当前用户的名字:
User.Identity.Name;
实现由web.config控制的验证';return true">
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
1、在web.config文件中有这一段内容:<authentication mode="Forms">
<forms name=".ASPXUSERDEMO" loginUrl="login.aspx" protection="All" timeout="60" />
</authentication>
<authorization>
<deny users="?" />
</authorization>
2.在login.aspx中如果用户名和密码正确则给予验证:
FormsAuthentication.SetAuthCookie(TextBox_name.Text,false); //在本页
FormsAuthentication.RedirectFromLoginPage(TextBox1.Text,false); //转到操作页
3.退出验证:
FormsAuthentication.SignOut();
4.获得当前用户的名字:
User.Identity.Name;
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
- 实现由web.config控制的验证
- 由Duwamish学习web.config的配置
- 由Duwamish学习web.config的配置
- 利用web.config来实现登陆验证
- 利用web.config来实现登陆验证
- 利用web.config来实现登陆验证[测]
- 表单验证 web.config配置
- 由git版本控制maven管理的简单web…
- web验证码的实现
- 如何实现由列表控件控制的属性表
- [转]如何实现由列表控件控制的属性表
- 如何实现由列表控件控制的属性表
- 如何实现由列表控件控制的属性表
- 权限控制和session验证的实现
- fowms验证中配置web.config
- fowms验证中配置web.config
- web.config 配置验证方式 Forms
- Web.config 文件中包含验证信息
- PHP加密文本文件并限制特定页面的存取
- 老外编的程序(九):Using Indexer Properties
- PHP强制对象类型之instanceof操作符
- 续(这个例子是针对ACCESS的更新、删除、还有定位的,希望能对你有所帮助)
- PHP控制语句
- 实现由web.config控制的验证
- PHP的十个高级技巧
- 微软开放.net的部分源代码(c#编译器等)
- PHP 实现多服务器共享 SESSION 数据
- 老外编的程序(二)--System.Net的示例程序
- PHP安全配置2
- Online CPU Console using a Web Control Library wit
- 构架Linux下的PHP+MySQL开发环境
- web组件的通信---浅谈事件