February 19, 2014 09:14 by Diego
One of the mainline features about ASP.NET Identity is to make it easy to Adding Email Confirmation. This process will send an email to the user with a link they can click on to confirm their registration and log in to the system. Prior to confirmation they will not be able to log in.
This post shows how you can adding email confirmation to ASP.NET Identity in MVC 5.
First I started by creating a new MVC 5 application. You no longer select whether you want an Internet or Intranet application, you just select the MVC template and select the authentication type you want to use. For an Internet type application you select Individual User Accounts. Once your web application is created open IdentityModels.cs in the Models directory. You will see a class called ApplicationUser which is analogues to the UserProfile in SimpleMembership. It is an empty class that inherits from IdentityUser which has these properties.
You must to modify the user information to store a the confirmation token and a flag indicating whether confirmation was completed or not.
Now let’s implement the method in the AccountMembershipService class:
Here, we’re setting the confirmationGuid to user. This is the GUID stored in the database that uniquely identifies the user. We then set the verifyUrl to the Verify action on the Account controller – passing the confirmationGuid as the ID parameter. The redirect to the RegisterStepTwo action just displays a view to the user that tells them to look for the email to complete the registration process.
Once the user gets the email they click on the link that will take us back to the controller action RegisterConfirmation. With that configured, when the user clicks the register button, they’ll be sent an email with the confirmation link it, and they’ll be redirected to the confirmation page. If we find a user we set IsConfirmed to true and return true from the method; otherwise we return false. If the user is confirmed they will be able to log in.
That is all there is to setting up email confirmation using ASP.NET Identity in MVC 5.
December 4, 2013 09:09 by Mike
BlogEngine.NET 2.8 is an open source .NET blogging project that was born out of desire for a better blog platform. A blog platform with less complexity, easy customization and one that takes advantage of the great features in .NET.
BlogEngine.NET 2.8 is easily customizable with have many downloadable themes, widgets, and extensions or you could make your own with some basic .NET skills. With BlogEngine.NET, it is easy to make your blog look and function exactly how you’d like.
BlogEngine.NET 2.8 Features
Here's a short list of all the features of BlogEngine.NET 2.8:
- Plug 'n play - BlogEngine.NET is very easy to setup and customize. To make it work, just upload the files to an ASP.NET 4.0 webserver and you’re ready to start writing. No database configuration, just plug 'n play.
- Full featured - BlogEngine.NET comes with all the features you would expect from a modern blog engine as well as new unique features such as AJAX comments and screenshot trackbacks.
- Web 2.0 - BlogEngine.NET features social bookmarks, OpenSearch support, XFN tags, AJAX, FOAF, SIOC, APML, Gravatars, coComments, tag cloud, Google sitemap and other so called Web 2.0 features.
- Referrer stats - The referrer statistics enables you to see which websites link to you, so you can follow up with comments or just to have fun. This feature is a real time killer that you cannot live without.
- Cool widgets - There is a variety of cool widgets that such as an AJAX post calendar or a blogroll that automatically retrieves the latest posts from each blog and displays the title beneath the blog. Most of the controls are configurable from the admin section.
- Advanced comment system - Comments are a very important part of a blog, so BlogEngine.NET features a very advanced commenting system in AJAX that supports country flags, live preview, Gravatars, coComments – all of which can easily be modified in the admin section.
- Full syndication suite - BlogEngine.NET supports syndication feeds in any possible location. You can find feeds on comments, categories, authors and a main feed. Both RSS 2.0 and ATOM 1.0 are fully supported.
- Trackbacks and pingbacks - All outgoing links from the posts is tracked- and pinged back, so your blog will get listed in the comments on the linked website if it supports it. When a new post is created, BlogEngine.NET automatically pings Technorati, Feedburner, Ping-o-Matic etc.
- Search - The search capability of BlogEngine.NET is one of the most advanced and it even allows the visitors to search in the comments. Everything about the search can be configured in the admin section.
- Standalone pages - Besides regular blog posts, BlogEngine.NET supports the creation of static pages that exist outside the blog chronology. Pages are useful for all kinds of information about you or your blog.
- Multi-author support - BlogEngine.NET fully supports multiple authors to write posts on the same blog. Visitors are then able to subscribe to the individual author’s RSS feed or view only the posts from their favourite author.
- Cool themes - BlogEngine.NET comes with some very cool themes for you to choose from. If you want to modify or create a new theme you can do so easily with just a basic understanding of HTML and CSS.
- XHTML compliance - All the controls in BlogEngine.NET are 100% XHTML 1.0 compliant. All posts you write automatically become compliant thanks to the tinyMCE text editor.
- Extendable - BlogEngine.NET is built from the ground up using nothing but C# and ASP.NET 4.0 all with simplicity in mind. It means that you can write new controls and themes by using the skills you already have as a .NET developer.