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

  • Home
  • SEARCH
  • 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 8907813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T03:00:49+00:00 2026-06-15T03:00:49+00:00

I am new in ASP.NET MVC4. I am creating a Empty MVC4 Project Template

  • 0

I am new in ASP.NET MVC4. I am creating a Empty MVC4 Project Template and trying to add ASP.NET Membership Provider into it but i am not understanding how can I do it. I am searching in Google but all demos are using Internet Application project template.

I know this question is not good but i am already spend two days for it.

Please give a some advice or tutorial for this purpose.

Update

According to Nesim Razon`s advice i copy and paste forms authentication sections to my empty project from a MVC4 Web Application (Internet Application template). But now i get an exception

To call this method, the “Membership.Provider” property must be an instance of “ExtendedMembershipProvider”.

[InitializeSimpleMembership]
public class HomeController : Controller
{

    public ActionResult Index()
    {
        WebSecurity.CreateUserAndAccount("Name", "Password"); // Exception is thrown from there.
        return View();
    }

}

I am also added the following directive in the Web.config file:

<add key="enableSimpleMembership" value="true" /> 
  • 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-15T03:00:50+00:00Added an answer on June 15, 2026 at 3:00 am

    Installing it

    You need to add the following Nuget Packages:

    • EntityFramework

    • Microsoft.AspNet.WebPages.OAuth

      Note: This package will install all the required dependencies automatically for you. This is a detailed list of all nuget packages installed:

      • Microsoft.AspNet.WebPages.WebData

        • Microsoft.AspNet.WebPages.Data
      • DotNetOpenAuth.AspNet

        • DotNetOpenAuth.OpenId.RelyingParty

          • DotNetOpenAuth.OpenId.Core

            • DotNetOpenAuth.Core

              • CodeContracts.Unofficial
        • DotNetOpenAuth.OAuth.Consumer

          • DotNetOpenAuth.OAuth.Core

            • DotNetOpenAuth.Core

              • CodeContracts.Unofficial

    Add a reference to

    • System.Transactions

    Testing it

    Now in order to test it, add the following to the web.config file (Under system.web):

    <authentication mode="Forms">
      <forms loginUrl="~/Account/Login" timeout="2880" />
    </authentication>
    

    Add the following connection string

      <connectionStrings>
        <add name="DefaultConnection" connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=aspnet-UnitTestQueries.UI-20121105001038;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnet-UnitTestQueries.UI-20121105001038.mdf" providerName="System.Data.SqlClient" />
      </connectionStrings>
    

    And what I did was to copy the controllers, models, filters and views from the Internet template and just modify things like the namespace and so on until you get it up and running

    This is the result (without styles)

    Before login

    enter image description here

    Registering

    enter image description here

    Logged IN

    enter image description here

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

Sidebar

Related Questions

I am trying to use the JsonArray class in a new empty asp.net mvc4
I have a new asp.net mvc project and i am trying to figure out
I'm working on a new asp.net mvc4 project using Visual Studio 2011 beta and
In ASP.net MVC4 there's this 'new' concept of a web API for exposing CRUD
I am creating an asp.net mvc4 site using entity framework 5 with codefirst and
I have a ASP.NET MVC4 web api that uses fluent NHibernate, but when I
I just upgraded my project from ASP.NET MVC1.0 to ASP.NET MVC4.0 One thing that
I'm testing the new ApiController in asp.net mvc 4 beta but when I try
I created a new project of type Asp.net MVC 4 I installed the package
i am new to asp.net MVC4 architecture i am get stuck with following thing

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.