0
votes

I am somewhat of a novice application developer, certainly very new to MVC4 and have been through a number of handy tutorials to learn the core principles of MVC. I do get lost with terminology as someone who is entirley self taught.

I am trying to replace an application I wrote previously that uses ASP.net membership which I was able to create myself. This application is an issue logging and reporting system that does a lot with an SQL database.

I have no concern dropping all the users and rebuilding the user database in the new simplemembership provider. Although, I am not sure where to start.

I feel as though using the ready made "internet application" template means I end up with loads of files / folders I do not need (or understand), so my question is, how to I start with MVC4 and simplemembership, ideally without using the "internet application" template.

Thank you.

3

3 Answers

0
votes

The Internet template does not add that many unnecessary files. It will add controllers, views, and models you will need for handling user log-on and registration. If you start from an Empty MVC project you will have to create these items from scratch. If you want to start from scratch I would take a look at the open source project SimpleSecurity that decouples SimpleMembership from your MVC application. There is an article here that describes this approach which will make it easier to incorporate SimpleMembership into an Empty MVC project. You can look at the example in the SimpleSecurity project so you can copy the controllers, views and models you will need. The example adds email confirmation and other features that are not available in the Internet template.

0
votes

There are some unnecessary files, but it depends on how you define "unnecessary".

If you don't care about signing in with a facebook or google account, and you don't care about WebApi, and you don't care about knockout.js and other stuff, you're free to delete it. You can use Nuget to uninstall the Webapi stuff. And you can also remove the OpenId stuff, but you will have to modify your AccountController to remove the code that makes use of it.

It would help if you could ask specific questions.. vague questions like this are hard to answer because we don't know what's unnecessary for you.

0
votes

Thanks for your help, I know my question was vague, but I was only able to build my new site from an empty template by following this guide.

I have changed a few things (i.e. an instance of SQL rather than local DB) and it all worked.

How to add ASP.NET Membership Provider in a Empty MVC 4 Project Template?