membershipprovider

To what extent does my custom sql role/membership provider have to conform to the samples?

I'm using the membership and role provider code from the Microsoft SQLProvider and SQLRoleProvider samples, and I'm getting a little overwhelmed with exactly how I can integrate my own schema into the source. The GetAllUsers method, for example, loads data from specific tables in the ASP.NET database and puts them into a very specific d...

ASP.NET: Total control of the ASP.NET membership provider

I have an application which uses the built in ASP.NET membership provider. There are two roles (admin and staff). I want admins to be able to see a list of current staff, add or delete staff and reset passwords. So far I've found very little information, but Membership.Provider.GetAllUsers looks promising. Is there any way I could show t...

Where can I persist what company a user belongs to with ASP.NET MVC and MembershipProvider?

When a user logs on to my ASP.NET MVC application I need to persist what company that user belongs to. The company they belong to will determine what database ~all~ their queries come from so it is important for me to query for their company as soon as they log in and persist it so I don't have to perform this lookup again. Where/How ...

Is the [Authorize] attribute for ASP.NET MVC controllers only for Membership Providers?

Does the [Authorize] attribute used with ASP.NET MVC controllers only function with sites that have implemented a MembershipProvider? ...

Where do I store additional user details using ASP.NET MVC and the SqlMembershipProvider?

So, I'm creating an ASP.NET MVC website. It has a fairly complex user sign-up page with a lot of fields. My question is, where should I persist this? The user tables created by the membership-provider tool don't contain these columns and I'm left confused about what the best practice is in terms of storing this additional information ...

How do I use a ASP.NET Login control without using a MembershipProvider?

This is an offshoot of this question. How do I use a Login control if I don't have a MembershipProvider to point it at? Am I understanding the use model correctly? Is it even reasonable to talk about using a Login control without a MembershipProvider? Dose the MembershipProvider do more than just username/password checking? Would it...

Using ASP.NET ActiveDirectoryMembershipProvider with a Forest...

I'm trying to setup an ActiveDirectoryMembershipProvider to go against a Forest and I can't seem to get it working. One of our AD Admins suggested I refer to the global catalog but it seems that is not supported. Anyone know if you can and if so how do you configure the AD Membership Provider to go against a Forest? Here are some of t...

How can I integrate updating lastactivitytime into the .NET FormsAuthentication process?

Hi, Basically, I'm trying to add support for tracking online users to a project I've inherited, which has a custom MembershipProvider and RoleProvider and uses FormsAuthentication. I've pretty figured out everything except the means by which I'm going to keep updating the lastactivitytime. The way I'd like to do this would be to just ha...

Are there any good XmlMembershipProvider and XmlRoleProvider implementations out there that can be used for Commercial purposes?

Does anyone know of any good XmlMembershipProvider and XmlRoleProvider classes that are able to be used for commercial purposes, royalty free? I know that BlogEngine.NET uses an XmlMembershipProvider and XmlRoleProvider, but it's covered under the Microsoft Recipricol License which states that you have to provide your users/customers th...

Custom RoleProvider using session

Hi, I was considering using the custom MembershipProvider / RoleProviders. Unfortunately, the security layer we currently have requires some session stuff being set. So, when the IsUserInRole() method is called, the Session object is always null, due to the Session stuff being all prepopulated. Any suggestions on how I would be able t...

MembershipProvider in .NET 4.0

Hi I use VS2010 B2 and .Net 4.0 in my project. I want to customize a MembershipProvider but i can't find this class in Vs2010. Guide me please. ...

Custom MembershipProvider with Web interface and DAL

Hi, I'm working on an ASP.NET solution with 2 projects. One is the web interface and the other contains my business logic. I'm using LINQ to SQL for my data access in the second project. Apart of my database, I have a table called Users which holds user information. I've started to implement a MembershipProvider. I notice that Members...

How do I set the LastLoginDate of the ASP.NET MembershipUser?

How do I set the LastLoginDate of the Membership user class to the UTC time instead of the server time? The following code does not work even though LastLoginDate is a settable property. Protected Sub Login1_Authenticate(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.AuthenticateEventArgs) Handles Login1.Authenticate ...

How do I manually log a user in with a MembershipProvider?

I'm experimenting with writing my own custom MembershipProvider in asp.net and I want to roll my own login page. We do some fairly special stuff at login time so we can't use the default login control so I need a way to manually log a user in. So far I haven't found anything on how to write your own login control so I'm here, wondering...

MembershipProvider user id

Greetings, I wrote a custom MembershipProvider for my asp.net mvc application. I get the user as follows: public override MembershipUser GetUser(string username, bool userIsOnline) { using (CPersistanceManager pm = new CPersistanceManager()) { pm.EnsureConnectionOpen(); MembershipUser members...

asp.net mvc session and custom MembershipProvider

Greetings, in my ASP.NET MVC application I've created a custom MembershipProvider. It works fine, however when user is successfully logged, I would like to create an Operator object and make it possible to access this object on every controller and view. I was thinking about session to do this but when session expires this object is nul...

Membership.ApplicationName issue

Membership.ApplicationName is a static string. My issue is that if i want to change this value to interogate the membership of another application on the same database, the change is permanent, meaning the Application Name for the current site has now globally changed to this value. In a perfect world i could call Membership.GetUser($u...

Storing User Information in Session with aspNetMembershipProvider

Hi Everyone, i m developing an application in .NET mvc2. i m using aspnetMembershipProvider for User registration and related activities. i need some custom information about user that i stored in a separate table (sysUser for example) and linked it to aspnetUser table through foreign key. after Login i need to fetch user's credentials ...

Membership.ValidateUser(long companyId, string username, string password) overload

Trying to get the method to check this way: Membership.ValidateUser(long companyId, string username, string password) As an overload. I already have a class that implements the MembershipProvider, MembershipUser, and RoleProvider classes (with overrides), but I can only cast the result of the Membership.ValidateUser return into what...

Paginate search results in an LDAP MembershipProvider by using the DirectorySearcher class

I have written an LDAP MembershipProvider and an LDAP RoleProvider for .NET, they are written in C# and I make use of the DirectorySearcher class in the System.DirectoryServices namespace. In the FindUsersByName- and FindUsersByEmail-methods in my MembershipProvider-implementation I want to paginate the result directly on the LDAP server...