MVC Membership – Preview 5

// September 6th, 2008 // MVC

Last weekend I posted a release of the MVC Membership Starter Kit that targets Preview 5 of the ASP.Net MVC framework. There was no packaged release targeting Preview 4 (though if you downloaded the latest source, it worked), so this release essentially packages the changes from both previews.

Why does the MVC Membership Starter Kit still exist?

The biggest change affecting the MVC Membership Starter Kit is that the default ASP.Net MVC Web Application project includes login/logout, register, and change password functionality as of Preview 4. This is great and I’m glad to see them do it. It is my hope they will eventually include membership administration functionality as well. For now, however, they haven’t included it. This leaves three main features that are now driving the existence of this project:

  1. Membership Administration
    What good is registration, login, and logout if a site’s owner cannot change a user’s roles or manage their user base? While Visual Studio’s Web Site Administration Tool covers most of your bases during development, it isn’t a real option for use by web site administrators in a production application.
  2. OpenID Integration
    Preview 4’s built-in login functionality only covers the use of standard username/password authentication. It seems likely that this will continue, as I am not aware of any plans for official OpenID support within the .Net framework. We are using Andrew Arnott & co’s DotNetOpenId project to help you let your users log in using OpenID.
  3. WindowsLive LiveID Integration
    Maarten’s LiveID integration has unfortunately not made this release. I anticipate that it will be available again for the next release, which will target the first beta release of ASP.Net MVC.

What has changed?

  1. No more login/logout/password retrieval.
    Because the AccountController and its views are now included by default in new projects, the need for this functionality has gone away.
  2. Less assemblies to reference.
    Rather than the MembershipAdministrationController and other code being compiled into a separate assembly that you must include, you now drop the controllers directly into your web app. This allows you to easily change the code as your project evolves. The starter kit’s implementation is really just a starting point that you can build off of.
  3. Controllers are split.
    In previous releases the OpenID and WindowsLive login functionality was included in the MembershipAuthenticationController. The OpenID functionality has since been moved into a separate controller with separate views. This was done because (a) the MembershipAuthenticationController no longer exists and (b) moving forward more of the pieces of this kit will be separated from each other so that you can include them a la carte.

Download

You can download the Preview 5 release of the MVC Membership Starter Kit from CodePlex:

http://www.codeplex.com/MvcMembership…?ReleaseId=16809

Kick It on DotNetKicks.comShout It on DotNetShoutOuts.com

12 Responses to “MVC Membership – Preview 5”

  1. kit says:

    This looks very handy, thank you.

    Just a note, the link at the bottom of your post is broken.

  2. Celik says:

    Thanks, looks like a handy toolkit. Will look at it to see how things are done.

  3. Troy Goode says:

    Thanks, kit. I have updated the post to correct the link.

  4. VB says:

    Hi Troy,

    Donwloaded your Preview 5 version and incorporated in my application. Looks like Html.ActionLink cannot be used as a generic type anymore?? I see you still use in your code but when I installed Preview 5 on my machine it doesnt show any of typed overloads? Also Html.Form(”",”")Html.SubmitButton doesnt work
    Please advise

  5. Ernest Bariq says:

    Hi, huge problem with french database, sp try to convert string to date but wrong format !!! -> no longer working

  6. Troy Goode says:

    @VB: The ActionLink method has been moved into the MVC Futures codebase (Microsoft.Web.Mvc). To access this method you’ll have to:

    1) Reference the Microsoft.Web.Mvc assembly (included with the Preview 5 installation).
    2) Add “” to the “” node in your web.config.

    In the next release I will likely switch all of those links to not use the generic type as that seems to be the direction the MVC team is headed, but for now the above steps should help you out.

  7. Troy Goode says:

    @Ernest: I’m not sure what you’re asking. Is this related to ASP.Net MVC or the MVC Membership project?

  8. celik says:

    Thank you for an updated version. I will be using this project to see how things are done in MVC.
    Only thing is i really want to have my own user table in db instead of the standard one with .Net membership provider.
    Do i have to write my own membership provider to do that?

  9. Troy Goode says:

    @Celik: Yes, you would create a custom membership provider to do that. The good news is this is quite easy. Here is a video from http://www.asp.net that covers the subject:

    http://www.asp.net/learn/videos/video-189.aspx

  10. Steve says:

    Great stuff!

    Can you include a CAPTCHA control for the user registration process?

    Thanks again!

  11. massfellows says:

    thank’s for the information It helped me a lot.

  12. asp.net says:

    thx, good information.