Questions tagged [custom-membershipprovider]
135 questions
58
votes
4 answers
How do I create a custom membership provider for ASP.NET MVC 2?
How do I create a custom membership for ASP.NET MVC 2 based on the ASP.NET membership provider?

ilija veselica
- 9,414
- 39
- 93
- 147
28
votes
4 answers
Microsoft Membership Provider Vs Custom Provider Vs Complete Custom Login System
I am currently converting a very old, but working classic ASP site to ASP.Net.
It has a completely custom written user management system. Whilst it works fine, it really needs a refresh as I want it to be more flexible for some future projects in…

Wil
- 10,234
- 12
- 54
- 81
27
votes
7 answers
HttpContext.Current.User.Identity.Name is always string.Empty
Hi I use a custom MembershipProvider.
I want to know the current username during an application scenario, but when I try accessing HttpContext.Current.User.Identity.Name it always returns string.Empty.
if (Membership.ValidateUser(tbUsername.Text,…

Shimmy Weitzhandler
- 101,809
- 122
- 424
- 632
12
votes
2 answers
How to create custom WebSecurity.Login and WebSecurity.CreateUserAndAccount methods in MVC 4?
When we choose New Project --> MVC 4 --> Internet Application, it will automatically generate AccountController for us. In this controller, I only care about 2 actions, Login and Register.
In MVC 3, it uses Membership's static methods,…

Triet Doan
- 11,455
- 8
- 36
- 69
10
votes
1 answer
Cannot create MembershipUser for custom MembershipProvider
I created a custom membership provider and am getting the following error trying to create a new "MembershipUser".
Could not load type 'MyTestApp.Membership.TestMembershipProvider' from assembly 'System.Web, Version=4.0.0.0, Culture=neutral,…

Dave
- 1,062
- 8
- 28
8
votes
1 answer
custom membership provider and unity dependency injection
I have found a few questions similar to the one I'm posting but I'm not getting from them what I really need.
I'm still struggling to implement my CustomMembershipProvider using Microsoft Unity DI.
Custom Membership:
public class…

SOfanatic
- 5,523
- 5
- 36
- 57
7
votes
1 answer
Does the default Membership Provider's OnValidatingPassword have to be overridden in custom implementations?
I am working to implement a custom Membership Provider for my .net application. I have set up the configuration for a minimum number of characters and non-alphanumeric characters, but it seems to let passwords through anyway, even when they break…

pc1oad1etter
- 8,549
- 10
- 49
- 64
7
votes
1 answer
NHibernate Could not determine type for X
I have created a Custom Membership Provider using NHibernate for my MVC 3 ASP.NET project.
I have some problems with the User class. I get the following error:
Could not determine type for:
FluentNHibernateMembershipProvider.Models.User,
…

Gunnar
- 986
- 3
- 10
- 24
5
votes
1 answer
Add Group Membership to Custom Membership/Roles provider
Being fairly new to the MVC Framework, I am trying to establish a custom Membership provider which can support the concept of Groups or departments.
I need to assign each user to belong to one (and only one) of several groups - each group (and its…

RogerDodge
- 100
- 1
- 7
4
votes
3 answers
How can you inject an asp.net (mvc2) custom membership provider using Ninject?
OK, so I've been working on this for hours. I've found a couple of posts here, but nothing that actually resolves the problem. So, let me try it again...
I have an MVC2 app using Ninject and a custom membership provider.
If I try and inject the…

AlDev
- 173
- 1
- 7
4
votes
3 answers
How can I debug a 'Default Membership Provider could not be found' error with WCF and a Custom ASP.NET membership provider?
This is problem for me with .Net 3.5 SP1 running on IIS7.5 64 bit (I tried forcing 32 bit but got the same result).
I have a WCF service that I want to use authentication-services with. When I have no behavior the WCF service paints (replies)…

JTew
- 3,149
- 3
- 31
- 39
3
votes
1 answer
MVC3 Custom MembershipProvider & Active Directory
I have an MVC3 application that has a custom membership provider and user/roles that are stored in the database. Users are created manually in the application as required and appropriate roles assigned.
I'd like to now extend the application to…

SimpleUser
- 1,341
- 2
- 16
- 36
3
votes
3 answers
Custom Membership + Ninject + InRequestScope = ObjectContext instance has been disposed
ObjectContext instance has been disposed in InRequestScope!
I tried for several hours across the web to try to solve a problem.
The ObjectContext instance has been disposed and can no longer be used
for operations that require a connection.
I…

ridermansb
- 10,779
- 24
- 115
- 226
3
votes
4 answers
Custom MembershipProvider without MembershipUser
Is it possible to create a custom MembershipProvider without the use of the MembershipUser class?
I'd like to use my own User class and to keep things tidy, I'd like to not have to use the MembershipUser class which has a lot of properties I really…

Johan Alkstål
- 5,225
- 9
- 36
- 48
3
votes
1 answer
ASP.NET 4 Custom Membership Provider Tables
Now this might just be straightforward, but I can't seem to figure it out..
I have set up the Custom Membership provider, and gave it the proper connection stuff.
What I know is that it connects to the correct database, but I know for sure that it…

Raskaroth
- 639
- 1
- 9
- 25