扩展的AccountController:ASP.Net MVC会员 [英] Extending AccountController: ASP.Net MVC Membership

查看:387
本文介绍了扩展的AccountController:ASP.Net MVC会员的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在ASP.Net MVC 1.0(最终)项目模板内置了基本的会员,但我需要它在两个方面延伸:

The ASP.Net MVC 1.0 (Final) project template has basic Membership built in, but I need to extend it in two ways:


  • 电子邮件确认以验证新帐户。

  • 其他领域在注册视图,如首页街道地址和部门号

  • Email Confirmation to validate new accounts.
  • Additional fields on the registration view, such as "Home Street Address" and "Department Number"

我计划修改模板文件,比如控制器/ AccountController.cs 的和的查看/帐号/ Register.aspx 的,但实际上我不知道在哪里启动。

I am planning to modify the template files such as Controllers/AccountController.cs and Views/Account/Register.aspx, but really I'm not sure where to start.

我发现有很多文章,有些应用(如这一个在ASPNET。 4guysfromrolla.com ),但试图实现ASP.Net MVC中的一个ASP.Net WebForms的教程可能是在浪费时间,如果有上手更好的办法还是在MVC已经实现紧密适合我的需要

I have found many articles that somewhat apply (such as this one at aspnet.4guysfromrolla.com), but trying to implement an ASP.Net WebForms tutorial within ASP.Net MVC could be a waste of time if there is a better way to get started or an implementation already in MVC that closely fits my needs.

我只是在寻找,从哪里开始一般性指导。
感谢您的帮助新的人来此框架!

I'm just looking for general guidance on where to start. Thanks for helping someone new to this framework!

推荐答案

有真的没有对MVC框架太大的不同,因为它适用于成员提供商。这不是很无缝但功能是相似的。作为MVC平台有目前的ASP.NET成员资格是接近的标准。但是如果你使用的会员服务提供的界面,你应该能够在自己的会员资格或配置文件提供堵塞,如果有必要。

There's really not much different about the MVC framework, as it applies to the Membership provider. It's not quite as seamless but the functionality is similar. The ASP.NET membership is as close to a standard as the MVC platform has at the moment. But if you use the interface provided by the Membership service, you should be able to plug in your own membership or profile provider, if it becomes necessary.

这里的人谁在实现了电子邮件验证博客条目 MVC。

我preFER的附加信息应用数据库的一部分,但如果你想它作为注册信息的ASP.NET配置文件提供者应在MVC为你工作。有一个在你链接的一系列应该给你的功能很好地概括的第6部分的例子。 下面是从本网站的问题,可以帮助你,如果你运行陷入困境得到它的工作。

I prefer that the additional information be part of the application database but if you want it as registration information the ASP.NET Profile provider should work for you in MVC. There is an example in Part 6 of the series you have linked that should give you a good overview of the functionality. Here is an question from this site that may help you if you run into trouble getting it to work.

这篇关于扩展的AccountController:ASP.Net MVC会员的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆