在默认页面和跳转页面之间,你产什么衔接访问的?你的默认页是不是母版页?
参考:protected override void OnInit(EventArgs e)
{
if (!HttpContextUtility.IsLogon())
{
FormsAuthentication.SignOut();
Response.Redirect("~/Login.aspx?ReturnURL="+HttpUtility.UrlEncode(Request.Url.PathAndQuery));
}
else
{
if (PageListCollectionWithAuthentication == null)
{
PageListCollectionWithAuthentication = PageSettingDataCollection.Select(t => { return this.ResolveUrl(t.URL); }).ToArray();
}
} base.OnInit(e);
}protected void Page_Load(object sender, EventArgs e)
{
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetNoStore();
........
....
}这是母版页的代码。
参考:protected override void OnInit(EventArgs e)
{
if (!HttpContextUtility.IsLogon())
{
FormsAuthentication.SignOut();
Response.Redirect("~/Login.aspx?ReturnURL="+HttpUtility.UrlEncode(Request.Url.PathAndQuery));
}
else
{
if (PageListCollectionWithAuthentication == null)
{
PageListCollectionWithAuthentication = PageSettingDataCollection.Select(t => { return this.ResolveUrl(t.URL); }).ToArray();
}
} base.OnInit(e);
}protected void Page_Load(object sender, EventArgs e)
{
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetNoStore();
........
....
}这是母版页的代码。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货