首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

不能跳转到指定页面,该如何解决

2012-05-24 
不能跳转到指定页面在浏览器直接输入页面B的URL,然后导向到登陆页面,登陆后跳转到页面B,而不是我指定的页

不能跳转到指定页面
在浏览器直接输入页面B的URL,然后导向到登陆页面,登陆后跳转到页面B,而不是我指定的页面A
为什么的呢?
 protected void Login1_LoggedIn(object sender, EventArgs e)
  {  
  Session["User"] = Login1.UserName.Trim();
  System.Web.Security.FormsAuthentication.SetAuthCookie(Login1.UserName.Trim(), false);
  Response.Redirect("~/Default.aspx",false);
  }
<configuration>
<system.web>
<authorization>
  <allow roles="Administrator" />
  <allow roles="Salesman" />
  <deny users="?" />
  </authorization>
  <authentication mode="Forms" >
  <forms loginUrl="login.aspx" name=".ASPXAUTH" timeout="300" defaultUrl="Default.aspx"/>
  </authentication>
  <roleManager enabled="true" />
  <compilation debug="true" targetFramework="4.0"/>
  </system.web>
</configuration>

[解决办法]
你说清楚点,最先打开的是哪个页面

热点排行