How do I use old membership system of ASP.NET 2 instead of ASP.NET Identity in ASP.NET 4.5? - asp.net-membership

I am working on a web application and I need to use a legacy membership system. Can you help me to know how should I have that database and how to implement that membership system in my web application that uses .Net 4.5?
let me explain it, you know nowadays we are using ASP.NET Identity but if you remember in past we were using ASP.NET Membership in .Net 2, can you remember old membership and authentication system? now i want to use that system instead of ASP.NET Identity. with old tables and structure.

Here is the history -
Membership Provider
Universal Providers
Simple Membership
ASP.NET Identity (Current version is 2)
ASP.NET Universal Providers is the last version of old ASP.Net Membership Provider. It uses Entity Framework Code First under the hood.
If you really have to use ASP.Net 2.0 Membership Provider, you need to use aspnet_regsql.exe to generate schema and store procedures. It is pain in the neck.
Here is the step-by-step instruction at 4guysfromrolla - Examining ASP.NET's Membership, Roles, and Profile

Related

Implementing SSO with Simple SAML in an Old .NET 4.0 MVC Application

I need to incorporate Single Sign-on in an existing MVC application. It's a bit long in the tooth now, with only .NET 4.0 libraries. So, a lot of that nice ClaimsAuthorizationManager/passive redirect stuff in 4.5 is not available to me.
Can anyone nudge me in the right direction for how I would implement this, dealing with a simple SAML token (which is the token-type of the php identity server that my company has set up)?
Maybe this could be a good starting point:
How to Configure an ASP.NET Relying Party Application with Windows Identity Foundation
https://msdn.microsoft.com/en-us/library/gg638734.aspx
and
Configuration for Windows Identity Foundation
https://msdn.microsoft.com/en-us/library/gg607699.aspx
and
The WIF Config Schema
https://blogs.msdn.microsoft.com/vbertocci/2010/05/11/a-hidden-gem-the-wif-config-schema/

ASP.NET Identity + WebForms for the cloud-based application?

Summary: My task is to decide how the user authentication should be implemented for the cloud-based project that should be evolved from the older WebForms application. I am at the beginning of the decision process, but I have to decide soon; so, I will appreciate your experience.
Why WebForms? The application is based on the older WebForms code, this way it should start from the WebForms code. The problem is that the application should be ready rather quickly, so the code must be reused as much as possible. Also, we do not have developers that have working knowledge with MVC. Some trade-offs are necessary. However, the log-in process will be new, and it can be implemented using the MVC approach.
What is new: The older code was built to run on the intranet web server, the users signed-in using simple login names. Security things were not that complex. The application uses the pre-ASP.NET Identity -- really old, and that part of the application should be replaced. There will be more groups of users that should work in the separate workspace (think of companies).
New acount -- authentication: The user should use valid e-mail address to ask for registration. For the new user, the e-mail should be validated as existing, and then it should be approved by the administrator dedicated for the group.
Authorization: A user will be allowed to work only with some data. Think in terms of using a single database where the user of one group should be allowed to access only the part dedicated to the group. However, there may be power users that may have more rights.
Should I focus on using ASP.NET Identity? If yes, (not being dependent on the older versions) should I start with ASP.NET Identity 3 that is currently in 3.0.0-beta7 (see https://github.com/aspnet/Identity.git), or should I stick with version 2?
ASP.NET Identity is Microsoft's main thrust for identity and membership and their newest identity library. If you are concerned about continued support then this is the library for you.
The ASP.NET Identity library supports your need for claims based authorization (in your case using roles/groups) and recording email addresses confirmation. This is available out of the box.
I would not recommend using ASP.NET Identity 3 however, as this is designed with ASP.NET vNext in mind, not something you want to do with your legacy system.
Stick with ASP.NET Identity v2.x

What is the difference between the regular Oracle ADO Provider and the Oracle Web ASP Provider?

I am migrating off of Microsoft's OracleConnection class for a asp.net-mvc website given that its being deprecated. I see on the oracle site, there are 2 different options, one is the Oracle ADO Provider for .Net 4 and the other is Oracle ADO ASP Provider for .Net 4. I am trying to figure out the difference because the code that I use to access Oracle in my site is not web specific (its sitting in a different project to the main MVC project and I plan on using this library in desktop apps as well).
Can someone explain the difference between these two libraries and advise on which one I should use for my situation?
The Oracle website can be a problem! :)
The ADO provider is the standard data access code for Oracle from .NET:
Oracle Data Provider for .NET (ODP.NET) features optimized ADO.NET
data access to the Oracle database. ODP.NET allows developers to take
advantage of advanced Oracle database functionality, including
Real Application Clusters
XML DB
The Oracle Providers for ASP.NET you mention, is a specific release for helping with things like ASP.NET State Management, Membership and Roles:
ASP.NET provider developers will discover the
Oracle Providers for ASP.NET are easy to learn and use as they share a
common schema and API with existing ASP.NET providers. They integrate
seamlessly with existing ASP.NET services and controls, just like
other ASP.NET providers.
Oracle offers the following providers:
Membership Provider
Role Provider
Site Map Provider
Session State Provider...

Using Windows Azure and ASP.NET MVC with Membership

I had an ASP.NET WebForms application. I have been migrating it to use ASP.NET MVC. In the process, I had to strip out my membership code and use a newer implementation. Currently, I am successfully using the SQL Table Profile provider with Windows Azure: http://code.msdn.microsoft.com/Using-the-SQL-Table-4c220996/view/SourceCode#content
My challenge is, what is the equivalent for membership? Considering the SqlMembershipProvider will not work with ASP.NET MVC, I'm not sure what to use now. I need to authenticate my users. Can someone please tell me what "DefaultMembershipProvider" I can use with my tables that are hosted on SQL Azure?
Thank you!S
You would need to use SQL Azure with your webrole to get it working. Sql Azure database has the Asp.net membership/role etc. tables, then Membership and Role provider will work normally without further changes to the Provider. And you sure can use SQLMembershipProvider with MVC3 ASP.NET Web Role and SQL Azure on Windows Azure. You may find articles on internet on how to use it all together:
http://romikoderbynew.com/2011/02/02/using-autofac-mvc3-sqlmembershipprovider-and-entity-framework-in-windows-azure-and-sql-azure/
Also you sure can create your own if wish to as described in this discussion:
ASP.NET MVC3 Custom Membership Provider - The membership provider name specified is invalid

MVC3 Table Storage and Account Validation examples

Has anyone seen any good examples of how I can use MVC3 and TableStorage with Azure account validation. Everything I look at seems to still be ASP.net or just a very basic example. I am surprised the Windows Azure site doesn't include more MVC examples.
What exactly do you need and what do you mean by "Azure account validation"?
As for Storage - the Microsoft.WindowsAzure.StorageClient.dll is a single assembly with common wrapping types around the Storage API. There is nothing technology specific. You can use storage client in any .NET assembly (well, not in Silverlight directly). But all operations over Windows Azure Storage are performed the same way regardless of whether it is a ASP.NET application, or MVC site, or WPF application, or WinForms application. So you may take the Azure Storage related code in your MVC application and use it as is. You just need an MVC3 Web Role, which is a standard and available project template since Windows Azure SDK 1.5.

Resources