ASP.net Identity Tutorial - asp.net

I was looking for a good tutorial that goes step by step to show how to implement the .net identity into the mvc framework and was unable to find any good tutorials, so could someone recommend me a good tutorial that will help me get started with identity?

Here are a few tutorials on Identity:
https://learn.microsoft.com/en-us/azure/app-service-web/web-sites-dotnet-deploy-aspnet-mvc-app-membership-oauth-sql-database
how to implement ASP.NET Identity to an empty MVC project
https://www.codeproject.com/Articles/762428/ASP-NET-MVC-and-Identity-Understanding-the-Basics
http://www.codeguru.com/csharp/.net/net_asp/mvc/securing-asp.net-mvc-applications-with-asp.net-identity.htm

Here you go mate, hope it helps out:
https://www.pluralsight.com/guides/microsoft-net/configuring-asp-net-identity
http://benfoster.io/blog/aspnet-identity-stripped-bare-mvc-part-1
http://benfoster.io/blog/aspnet-identity-stripped-bare-mvc-part-2

Related

Login and register on ASP.NET MVC 5/6

I'm beginning with asp.net mvc and I'd like to learn to the best way for user registration and login whitch is used in real projects. Please, can anyone share good tutorial for beginner? Thanks
You can find a lot of tutorials if you google "ASP.NET Identity 2.X". Here is one I found ASP.NET Identity Tutorial
This should give you a foundation to build on if you need to do something more complex.
You can use Membership api for user creation and login, And it is widely used in real projects.
check this link:-
https://msdn.microsoft.com/library/879kf95c(v=vs.100).aspx

How to implement DotNetOpenAuth as Oauth provider in MVC3 .net?

I have been researching for a while now about how to implement an OAuth provider to secure my web api, but without good results.
For what I've seen so far, apparently there are only three libraries to develop an OAuth provider in .net:
1- DotNetOpenAuth
2- DevDefined
3- OAuth.net from madgex
madgex doesn't have any documentation for providers at all, at leats I haven't found anything, same with DevDefined, well, the last one has some documentation, but it lacks samples.
DotnetOpenAuth I think is the one most developers use, but I'm having a hard time to understand its samples, and documentation is terrible.
Has anybody implemented any of these libraries to write an Oauth PROVIDER, NOT CONSUMER, or anyone knows where I can find a decent documentation fro any of these.
For the record im trying to develop a 3-legged oauth provider.
Can anybody help me out here??
Have you checked out this project template, which although it's MVC 2 should provide some useful ideas for doing it in MVC 3:
http://visualstudiogallery.msdn.microsoft.com/81153747-70d7-477b-b85a-0374e7edabef
Then there is the OAuthServiceProvider sample that comes with DotNetOpenAuth, which is WebForms but the principles are mostly the same.
A good sample of DotNetOpenAuth implementation could be found here Releasing an ASP.NET MVC 3 OpenId StarterKit under Open Source License
Project url: http://mvcopenid.codeplex.com/
It should be good for you to start with.
UPDATE
By the way in ASP.NET MVC 4 third party auth providers it is out of the box.
I have followed the steps mentioned at https://github.com/DotNetOpenAuth/DotNetOpenAuth/wiki/Security-scenarios to implement an OAuth 2.0 authorization service.
I have used the below link to create security certificates:
http://www.jayway.com/2014/09/03/creating-self-signed-certificates-with-makecert-exe-for-development/
Don't forget to change your solution to use the thumbprints from the certificates created by you.
This is the best place to understand the OAuth 2 protocol:
https://www.rfc-editor.org/rfc/rfc6749

Developing mvc application

What is mvc ? What are the benefits developing mcv website ? How can I develop mvc website, that is what I have to install,I have installed microsoft visual studio 2005 in my pc then what I have to install to develop mvc website ? I am begginer in developing website.
And which are the best free resource I can use to learn how to develop best mvc website,like ebooks or anything ?
Please give me suggestion.
Below links will surely help you to understand MVC.
ASP.NET MVC Framework Tutorial
ASP.NET MVC Framework Overview
MVC 1 download details
Also now MVC 2 is avaliable.
Two seminal examples have been published with lots of documentation:
Nerd Dinner : http://nerddinner.codeplex.com/
This was built against MVC 1.0 so some of the syntax is a bit outdated but is still applicable and it goes through several facets of your typical MVC application. There is a link on the homepage there to a walk through available in PDF and HTML form.
MVC Music Store : http://mvcmusicstore.codeplex.com/
This example is made to demonstrate some of the new MVC 2.0 features and other new MVC practices. It also has a vast document walking through the creation of the website and its code. Download the code and read the documentation.
These are by no means the best but it comes straight from the source (Microsoft dev team) and are a good start for beginners.
Here's a great place to start: http://www.asp.net/mvc
The reference #Kane gave it great. There are a number of tutorials and videos. But you can also read some blogs like: haacked.com or http://weblogs.asp.net/scottgu/.
Also there is a great codeplex project kigg that is good to look over and review.
http://kigg.codeplex.com/
Those are a few more resources to consider. Also don't forget here on SO. There are a lot of the problems that people have encountered and can be a good resource.

ASP.NET MVC and User Authentication with NHibernate

I am about to start a new application and am excited about using asp.net mvc and nhibernate. However, the big "problem" is how I handle the user authentication stuff. What are some ways those used to using nhibernate and MVC solve this problem?
My thought is let asp.net do its own thing and I do my own thing database wise. Am curios if I should role my own using the provider model and nhibernate, if I can figure out how. Or is there a way to integrate current code that is in the mvc example into nhibernate?
You can still use the ASP .NET 2.0 Membership APIs from ASP .NET MVC.
Same question here and Manuel Abadia has written a custom NHMembershipProvider here.
4 guys from rolla have an excellent post if you want to buil your own provider on top of the asp.net membership API : https://web.archive.org/web/20211020114106/https://www.4guysfromrolla.com/articles/110310-1.aspx

How to configure Nhibernate in ASP.Net

I am a beginner in ASP.Net. I am starting a new project using ASP.Net and Nhibernate. I figured out that the hibernate.cfg.xml would not do the trick for the configuration of Nhibernate. I googled for on how to configure NHibernate in ASP.Net and this is simplest that I got but I can't get it to work. I also downloaded some projects using ASP.Net and Nhibernate but can't seem to understand how it is configured. And so I am here asking for your opinion/knowledge.
How do you configure HHibernate in an ASP.Net project? or can you please provide a link to
tutorial on how to do it.
Thank you in advance.
Here are some resources that helped me when I first did an ASP.NET project with nHibernate.
Intro and Configuration
Architecture
Best Practices
Good luck and great choice!
If you are really starting the most simple way to start is
trunk\nhibernate\src\NHibernate.Example.Web
or
branch\2.1.x\nhibernate\src\NHibernate.Example.Web
link: http://code.google.com/p/nhprofile/downloads/list

Resources