Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9056053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T14:06:04+00:00 2026-06-16T14:06:04+00:00

Hi I am trying to create an e-commerce website with asp.net MVC3.I am at

  • 0

Hi I am trying to create an e-commerce website with asp.net MVC3.I am at the part where I have to login the User into my application.I can validate it’s credentials but I can not seem to able to log him in.Here is what I have so far:

if(Membership.ValidateUser(model.Username , model.Password))
{
    if(string.IsNullOrEmpty(returnUrl))
    {
        return RedirectToAction("Index", "Home");
    }
    else
    {
        return RedirectToAction("Index" , returnUrl);
    }
}

I know I still have to add something here to log the user into my application but I do not know what.Can anyone please tell me what do I have to do next?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T14:06:05+00:00Added an answer on June 16, 2026 at 2:06 pm

    If you’re using Forms authentication, you need to set the Authentication cookie:

        if(Membership.ValidateUser(model.Username , model.Password))
        {
            FormsAuthentication.SetAuthCookie( model.UserName, model.RememberMe );
            if(string.IsNullOrEmpty(returnUrl))
                {//...
    

    Also, you should read this article on preventing open redirection attacks.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying create a small web application that allows a user to login
I am trying to create an e-commerce application and now I am at the
I'm trying create a RCP Application with Eclipse, but I can't get past the
I am new to asp.net & trying create a object, but there is a
I'm trying to create categories of government websites where the user can click from
So I'm trying to create an commerce system for an assignment. I have used
I have a wordpress website, and I want to create a simple web commerce.
I'm trying to create a gift wrapping module for Drupal commerce. I have created
I have been trying to work with DDD style for my e-commerce application. Most
I'm trying to create an e-commerce site which sells PC components using PHP and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.