SimpleMembership with ASP.Net MVC 4 project - asp.net-mvc-4

I created a MVC 4 project using MS Visual Web Developer 2010 Express. It by default uses "SimpleMembership" and it connects to a database (A) on my local SQL Server. I ran the web project and registered a trial user, and it was successful. When I checked the database A with Management Studio, the user was there.
However, when I turned on debug and opened the ASP.NET Web Application Administration Web Tool. It showed User: 0. Obviously the Admin Tool did not check the database A. Then I was able to create another user via the Admin Tool. Surprisingly it was found added to the "aspnetdb.mdf" in "App_Data" folder of my project.
My questions are:
how I can make the Admin Tool connect to the database A on my SQL Server instead of the "aspnetdb.mdf" file as I don't want to store my user profiles in two separate places.
Why "aspnetdb.mdf" uses ASP.Net Membership instead of "SimpleMembership"?
Thanks!

The Web Application Administration Tool was developed for SimpleMembership's predecessor ASP.NET Membership. When Microsoft released SimpleMembership they never bothered to provide support for any admin tool; you have to create one yourself. Take a look at this QA which explains in more detail.
Be aware that Microsoft has dropped SimpleMembership in MVC 5 for ASP.NET Identity. ASP.NET Identity is a much better solution, but it still does not come with an admin tool. I would move to ASP.NET Identity if possible. Here is an article on how to migrate to ASP.NET Identity.

Related

Should I use the ASP.NET Core Identity or Active Directory

I am writing an ASP.NET Core 6 application and have to have user logins. The choices are either ASP.NET Core Identity that is a part of the ASP.NET Core 6 framework or to use Active Directory.
This will all be hosted on Azure so if I use Active Directory it will be Azure Active Directory used solely for this application.
As I see it the trade-offs are:
ASP.NET Core Identity
Integrated into the framework - easier to use.
Active Directory
Supports more MFA options
Need it if I'm going to also have a Web API available too
Can connect another Active Directory to provide users eliminating the need for duplicate logins for users on associated systems.
Am I missing something here? Because it appears to me that it's a slam dunk to use Active Directory.

Add support for AD authentication on a MVC 4 application

I have a big MVC 4 application that uses Form authentication.
It has its own user and privileges management using a custom database.
Now I need to adapt this application to allow integration with customer AD and allow SSO using their users.
All the guides I found online assume the creation of a brand new project.
I tried to add support using Connected Services, but I cannot find AD service (Only Office 365 Services with Microsoft Graph, but that's not the case).
I would like to make it configurable so I can choose to deploy in both in its own legacy user management scenario or the AD integration scenario.
Can anyone point me in the right direction?

Single Sign On With ASP.NET Identity Framework

This question has been asked so many times, and a quick search came up with lot of results. But I haven’t gotten satisfactory answer yet.
We have 2 web applications ( and we may have more in future) App1 is .Net 4 Silverlight Application and App2 is Node.js/Angular application. Both applications have different domains. www.app1.com and www.app2.com The App1 is hosted in IIS and App2 is NOT in IIS
Now, we have to implement Single Sign On Feature to support these applications. I was looking into ASP.NET Identity which is available in .Net 4.5.
Questions
1. So I thought of creating new MVC 5 application using .Net 4.5 that could serve as SSO site. If possible I wanted to use our own SQL server to maintain the credentials. But I am not sure how to share authentication ticket/cookie between sites. I have done this before using Forms Authentication where I had to use same machine key on all websites. But those were all .net applications. However with new identity framework and OWIN and with different types of applications i am not sure. So before I jump into it and start developing I wanted to know is it recommended approach, and if yes, can someone point me in the right direction. An article would greatly help.
2.Second options is to use Azure AD, but I am assuming we have to pay for it( we have MSDN sub) and we do not have local active directory either. Is Azure AD is the right option here? Does it work with Node.Js/Angular application. With Azure AD I guess App1 I may have to upgrade it to .Net 4.5

Users authentication in asp.net mvc 4 application on azure

I'm building a website from scratch using ASP.NET MVC 4.
The application is hosted on Windows Azure.
It's a rather basic website application.
Next, I would like to authenticate my users.
The authentication requirements are, again, rather basic and straight forward.
I did some reading, and it seems that the best two options for me to achieve users authentication are:
1. ASP.NET SimpleMembership
2. Windows Azure Active Directory Access Control
Now, my questions are, which one should I choose? which one is more secured?
It is dependent on what you want. WAAD -ACS gives you option to integrate various identity providers like google,yahoo etc or federate with Active directory services.
But if do not want such options and simply use your existing asp.net membership you can do that as well.

ASP MVC4 membership VS2010

Here's a funny one - I suspect because I am using VS 2010 with MVC4.
Created an MVC4 App using the internet template. I get AccountController.cs and the basic pages allow me to register and add users. So far so good. However, the ASP.NET configuration tool (from Project menu) seems to be using a different database.
Web.config has this:
but my MVC project also has a ASPNETDB.MDF inside app_data. ASP.NET configuration tool seems to be using ASPNETDB.MDF, but run time seems to be using the one referenced by DefaultConnection.
Also, after doing some research on here and elsewhere, other people's Web.Config seem to have lots of entries for providers etc. which I don't have. Am I missing some update / NuGet package?
All I want to do is use MVC4 with users and roles, and was planning to use the configuration tool to setup the predefined roles and some basic users.
Thanks in advance,
Ray