ASP.NET 2.0 二级域名Forms验证模式下共享登陆状态
在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=".ASPNETFORM" domain="yourdomain.com" loginUrl="/login.aspx" defaultUrl="/default.aspx" protection="All" timeout="30" path="/" requireSSL="false" slidingExpiration="true" enableCrossAppRedirects="false" cookieless="UseDeviceProfile" />
</authentication>
注意forms节点的domain属性, 如果你的主域名和子域名是www.abc.com, 123.abc.com, .....,那么此domain属性你应该填abc.com即 domain="abc.com".
很简单吧, 祝你实现成功!
原帖转自:http://www.cnblogs.com/jzywh/archive/2007/09/23/902905.html
相关文档:
string[] files = Directory.GetDirectories(Server.MapPath("Themes/"));
先声明了一个字符数组,mapPath方法得到的是一个绝对路径。
因为GetFiles返回的是一个string[]数组,所以用 files来接收它。
然后我们在用一个foreach循环来遍历这个数组,取出所有值。
foreach (string file in files)
{
Response.W ......
Cascading drop down lists is a really nice feature for web developers. I thought it was time to write an article on how to do this using ASP.NET and jQuery. Well here’s one way of doing it. Before we get started, this example uses the latest version of jQuery which is 1.3.2.&n ......
在服务器端,处理一个ASP.NET Web Form需要几个步骤,在每个步骤都会引发各种事件,这就允许你把网页插入到任一步骤的处理流中并且响应任何你所期望的处理。
以下是ASP.NET网页处理流中的几个主要步骤
1.网页框架初始化
2.用户代码初始化
......