0
I’m doing an app on ASP . net where I’m logging in with controllers. However on the login page when I click on the hyperlink to do password Recover the control does not leave the login page and I am not redirected to the password Recover page. If I see the URL it changes the url to recoverpassword.aspx but the Recover page does not appear and does not leave the login page.
Can someone help me understand why?
Thank you.
Code on the page default.aspx:
public partial class _Default : Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!this.Page.User.Identity.IsAuthenticated)
{
FormsAuthentication.RedirectToLoginPage();
}
else if (this.Page.User.IsInRole("Saba") || this.Page.User.IsInRole("CorpAdmin") )
{
//Server.Transfer("Report/ListSabaReports.aspx", true);
Response.Redirect("~/Report/ListSabaReports.aspx");
}
else if (this.Page.User.IsInRole("SumTotal"))
{
//Server.Transfer("Report/ListSumTotalReports.aspx", true);
Response.Redirect("~/Report/ListSumTotalReports.aspx");
}
else if (this.Page.User.IsInRole("X-Domain"))
{
//Server.Transfer("Report/ListSabaReports.aspx", true);
Response.Redirect("~/Report/ListSabaReports.aspx");
}
}
}
Code on the web config:
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
<controls>
<add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting"
assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</controls>
</pages>
I wish it was that when the login page appeared I have there a hyperlink with the text recoverpassword and I wanted to be redirected to that page but I can’t always get it on the login page. SOMEONE HELPS ME?
Could you post part of your controller where you do this login part so we can look at it? It would make your question a lot easier.
– Leonardo Coelho