简体   繁体   English

从零开始的MVC

[英]MVC from scratch

我不使用VS10提供的现成的MVC模板,而是创建一个空的Web应用程序,然后创建文件夹:Models,Views,Controllers,并希望从头开始创建一个简单的MVC Web应用程序,但我没有找到任何有关此的教程在线上,我已经为我的应用程序创建了数据库,我需要下一步做什么使登录/注销会话式Web应用程序可在浏览器上运行。

Phil Haack has a really empty MVC project template http://haacked.com/archive/2012/01/11/a-really-empty-asp-net-mvc-3-project-template.aspx . Phil Haack的http://haacked.com/archive/2012/01/11/a-really-empty-asp-net-mvc-3-project-template.aspx确实是空的。 The bare minimum. 最低限度。

As for authentication why can't you use the default project template which has a working example. 至于身份验证,为什么不能使用具有有效示例的默认项目模板。 If you really don't want to use it, search online. 如果您真的不想使用它,请在线搜索。 Lots of examples of how to implement authentication. 有关如何实现身份验证的许多示例。 If you have a specific problem with authentication, ask another question here. 如果您在身份验证方面存在特定问题,请在此处提出另一个问题。

The really empty MVC project template is a good start. 真正空的MVC项目模板是一个好的开始。 I'd nuget the jquery, jquery.validation also. 我会把jquery,jquery.validation也弄成小节。

About authentication , I'll give you some hints to research: FormsAuthenticationTicket, FormsAuthentication.Encrypt/Decrypt, Response.Cookies, FormsAuthentication.SignOut (sic), asp.net pipeline events 关于身份验证,我将为您提供一些研究提示:FormsAuthenticationTicket,FormsAuthentication.Encrypt / Decrypt,Response.Cookies,FormsAuthentication.SignOut(sic),asp.net管道事件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM