Email Confirmation with MVC 5 and Asp.net Identity

↘锁芯ラ 提交于 2019-12-29 03:18:49

问题


I have been searching, but have not found any documentation on how to implement Email confirmation with MVC 5 using the new ASP.net Identity. There does not seem to be any documentation on this topic (that I could find).

Has anyone solved this yet? I am very surprised that this is not included by default in the default MVC 5 project.

Any guidance is greatly appreciated.

Thank You


回答1:


I have written a step-by-step article on how to add email confirmation when using ASP.NET Identity. You can get the source code here in the project folder AspNetIdentity\AspNetIdentityRefApp. I have also created a service layer that encapsulates ASP.NET Identity, making it easier to incorporate in new MVC 5 applications and mimics the WebSecurity API used by SimpleMembership. You can get that class library from AspNetIdentity\SimpleSecurity.AspNetIdentity There is also reference app for using this library in AspNetIdentity\SimpleSecurity.AspNetIdentity.RefApp. The class library and reference app also show how to implement password reset using a token and basic authentication on Web API's.




回答2:


For ASP MVC 5 you can now try the pre-release of Identity 2 which has email confirmation and password reset...

http://blogs.msdn.com/b/webdev/archive/2013/12/20/announcing-preview-of-microsoft-aspnet-identity-2-0-0-alpha1.aspx




回答3:


I installed identity framework 2 in an MVC website in May 2016, and it includes email confirmation, although it's commented out initially. Here's what to look for in the account controller:

So when a user registers, you can uncomment the code to send them an email. If you've got a good understanding of the MVC model, the rest should be relatively straightforward.



来源:https://stackoverflow.com/questions/19295236/email-confirmation-with-mvc-5-and-asp-net-identity

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!