Quantcast
Channel: Security
Viewing all articles
Browse latest Browse all 4737

Always redirects to login page

$
0
0

Hi All,

I have implemented form authentication in my project by gone through some article on net.

But After implementing form authentication it goes in same block( where user id and password match) but redirects to Login.aspx instead of mentioned page in that block.

if (status == 1)
        {
             // user id and password exists 
            if (FormsAuthentication.Authenticate(txtUserId.Value.ToString(), txtPassword.Value.ToString()))
            {
                FormsAuthentication.RedirectFromLoginPage(txtUserId.Value.ToString(), false);
                Response.Redirect("Dash_Board.aspx");
            }
            else
            {
            }  

           
        }

Web config<system.web><authentication mode="Forms"><forms loginUrl="Login.aspx" defaultUrl="Dash_Board.aspx"></forms></authentication><authorization><deny users="?"/></authorization>

Please suggest.
 


Viewing all articles
Browse latest Browse all 4737

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>