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

index.aspx automatically shows recently registered users

$
0
0

Hi everyone,

I've made a membership by create user wizard. everything is good but after click on finish register button, when page redirect to index .aspx, this page thinks tht user logged in. whereas user didnt login just added to DB.

here is the code:

 protected void CreateUserWizard1_NextButtonClick(object sender, WizardNavigationEventArgs args)
    {
            try
            {
                Membership.CreateUser(CreateUserWizard1.UserName, CreateUserWizard1.Password, CreateUserWizard1.Email);
                Response.Redirect("index.aspx");

            }
    
        
            catch (MembershipCreateUserException e)
            {
                Literal errormessage = (Literal)CreateUserWizard1.WizardSteps[0].Controls[0].Controls[0].Controls[0].Controls[0].FindControl("ErrorMessage");
                errormessage.Text = GetErrorMessage(e.StatusCode);
            } 
    }

in index.aspx just have a login name and login status control. tht's it.

what is the solution?


Viewing all articles
Browse latest Browse all 4737

Trending Articles



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