Asp.Net Forms验证文章中最后的web.config文件
<?xml version="1.0"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<system.web>
<authorization>
<deny users="?"/>
</authorization>
<authentication mode="Forms">
<forms loginUrl="login.aspx" name=".ASPXAUTH1" domain=".cnblogs.com" />
</authentication>
<machineKey validationKey="F9A61F796A204D9945889B64D9DA5086E89CEC5200F0CED4" decryptionKey="D679BCF2A76DEBB04D7FED5E5967F46C92FEF2B31AD5D7C9" validation="SHA1" />
<compilation debug="true"/>
<roleManager defaultProvider="MyRoleProvider"
enabled="true"
cacheRolesInCookie="true"
cookieName=".ASPROLES"
cookieTimeout="30"
cookiePath="/"
cookieRequireSSL="false"
cookieSlidingExpiration="true"
cookieProtection="All" >
<providers>
<clear />
<add name="MyRoleProvider"
type="MyRoleProvider"
writeExceptionsToEventLog="false" />
</providers>
&
相关文档:
在asp.net 1.1中, 二级域名Forms验证模式下共享登陆状态的方法请参考下面文章:
http://www.cnblogs.com/caomao/archive/2005/07/05/186606.html
而在asp.net 2.0中实现方法更为简单,只需修改web.config文件即可,修改方法如下:
<authentication mode="Forms">
<forms name ......
asp中Session的工作原理:
asp的Session是具有进程依赖性的。ASP Session状态存于IIS的进程中,也就是inetinfo.exe这个程序。所以当inetinfo.exe进程崩溃时,这些信息也就丢失。另外,重起或者关闭IIS服务都会造成信息的丢失。
asp.net Session的实现
asp.net的Session是基于HttpModule技术做的,HttpModule可以在请求被 ......
test.xml
<?xml version="1.0" encoding="utf-8" ?>
<root>
<R SecuCode="601600" Glossary="学IT网测试获取XML结果显示正常,。。。。。。。哈哈" />
<R SecuCode="600056" Glossary="测试第二个,。。。。。。。哈哈" />
</root>
下面xml解析 ......
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Xml;
private XmlDo ......