quickest way to implement .net authentication in Web Forms with Entity Framework 6 - webforms

I have been checking resources to implement authentication in my web forms application built with entity framework. All examples I found are MVC-related. I have used regular Asp.Net Membership framework a long time before I began to use EF. However, I could not find Membership implementation with Entity Framework code-first. I did implement the Claims-Based Identity (EF created the tables for me in DB) but I do not know how to utilize it in the application (like login), and it looks more complicated to me. Can anyone guide me ?

There are a couple of good tutorials on the asp.net web site:
http://www.asp.net/identity/overview/getting-started/adding-aspnet-identity-to-an-empty-or-existing-web-forms-project
http://www.asp.net/web-forms/overview/getting-started/getting-started-with-aspnet-45-web-forms/membership-and-administration

Related

Migrating existing ASP.NET Core 3 App to Orchard Core

I have a ASP.NET Core MVC Application that uses EntityFramework Core and Identity.
So far I have only 2 Connection Strings in Appsettings.json .
Context for Models and Context for Identity.
I would like to have a Database Connection string for each user group.
Does anybody have experience with Orchard Core Framework? It was linked on the Microsoft Documentation, because multi Tenant Database for each User is not supported by Identity.
Can anybody tell me if it is difficult to migrate an existing Project to this Framework?
I also read about Multi Tanent App on a blog form Gunnar Pipemann. This approach would be an alternative for me.
Maybe some of you have developed a similiar App with Asp.net Core MVC and can share their approach.

Custom Membership Provider with Entity Framework

I have a MVC web application that I am using my own membership provider. I have implemented the Entity Framework with POCO’s, repositories, and a unit of work to both the MVC app and the Custom Membership Provider.
I am finding that when the data changes outside of the entity created in the membership provider, the data is not updated. The system works fine when the entities are short lived in a web request, but the membership provider is started with the web application and is not disposed like a controller.
I have read every post I could find and have not found how to overcome this limitation of Entity Framework. Do I have to resort to the old ADO code to get the latest data from the database?
Make sure you have overrided WebSecurity and other Microsoft Membership Provider classes at the right way. For Security reasons and the Architecture of Entity Framework, may not happen appropriate coordination among those. A good example for implementing sample membership provider with Entity Framework and Asp.net Membership provider can be found at The nuget gallery. I wish to be useful for you.

WCF or Asp.Net MVC for API acess?

I wanted to get some thoughts about API access either through WCF or MVC. Either works, but I like the idea of using MVC to build custom routes. I know this is possible with WCF (maintaining the request routes), but aside form the security disadvantages of not using WCF (which are not deal breakers) what other thoughts does the community have regarding this.
I have a project where we have been discussion using MVC or WCF and we are comfortable with both, but we are swaying towards MVC.
You should use the new ASP.Net MVC Web API framework, new to MVC 4.0.
I think MVC makes a great web API. I did this not too long ago for an android app that uses a RESTful web API using MVC 3. Here's a good tutorial:
http://msdn.microsoft.com/en-us/magazine/dd943053.aspx
If you're feeling adventurous check out the Web API framework included in MVC 4. NOTE: I have not experimented with this yet but plan to in the near future. See here: http://www.asp.net/web-api

Create Custom Membership Provider (Entity Framework vs Linq)

I'm starting work on a Custom Membership provider and I was wondering which option would be the best to develop this application in Linq or Entity Framework?
Also I have a need to link two table from different database via a common ID and I was wondering does anyone know of any good tutorials about creating a MVC 3 Web Application that uses either Linq or Entity Framework to do this.
From my research Entity Framework seems to be the best method suited to my situation but I would appreciate some advice / confirmation that this correct and a little direction to a tutorial is possible?
By Linq, you mean Linq to SQL vs. Entity framework? If so, then I would recommend using Entity Framework. Microsoft's development on Linq to SQL has virtually stopped so EF has a better future.
NerdDinner is one of the more popular tutorial applications that uses ASP MVC 2 and entity framework. ASP MVC 2 is similar enough to get started with the basic concepts. Here is a good walk through tutorial:
http://nerddinnerbook.s3.amazonaws.com/Intro.htm
The code itself is freely available:
http://nerddinner.codeplex.com/

.NET 4.0 MEF. Pluggable ASP.NET MVC 3.0 Approach

I am going to start new MVC 3.0 .NET 4.0 application.
I want to implement each component for my web site once and simply reuse it then for another web sites i going to build.
Currently i am looking the best practice i can use to achieve my goal.
I did some research and found that I may get a lot of advantages using MEF.
I found interesting MEF MVC solution called plugable MVC http://www.thegecko.org/index.php/2010/06/pluggable-mvc-2-0-using-mef-and-strongly-typed-views.
Is it really worth to use such kind of approach(Plugabble MVC) of building MVC apps?
Advantages disadvantages of pluggable MVC?
May be somebody may suggest something else?
What specific problem are you trying to solve? MVC is a very extensible and pluggable framework as it is. I would say that for a simple site MEF is not necessary. Please provide more information on the issues you are running into with the stock MVC framework.

Resources