membership-provider

How to remove one of the Item in Roles.GetAllRoles()

Hi there I have a collection of Roles.GetAllRoles() on Membership Providers. Now I have one role "System Administrator" that I would like to remove from that list so I can use in my list. How do I do this? public void AssignUserToRoles_Activate(object sender, EventArgs e) { try { Availabl...

Roles.IsUserInRole() on My Base page class

Hi there I have a base page (inherited from System.Web.UI.Page and all my pages inherit from this base page) in my .Net web application and at the moment if I put the following methods protected void CheckAllowedRole(string UserName, List<string> AllowedRoles) { try { bool IsAllowed = false; ...

Profile.GetProfile() on Base Class

Hi there I have a base page (inherited from System.Web.UI.Page and all my pages inherit from this base page) in my .Net web application and at the moment if I put the following methods: protected int GetProfileTenant() { try { ProfileCommon p = Profile.GetProfile(Profile.UserName); return Con...

Is it possible to change the username with the Membership API

I am using the default sql membership provider with ASP.NET and I would like to provide a page to change the user's username. I believe I am sure I could do this with a custom provider, but can this be done with the default provider? Second part of my question is: Should I allow users to change their username after the account is create...

NonComVisibleBaseClass was detected; How do I fix this?

My class derives from System.Web.Security.MembershipUser I am getting this error when submitting the form. The popup form uses ASPPDFand the application did not have this problem before implementing the custom MembershipProvider goodies. Note this is a debugging error only. It seems to work when I am not debugging. Does anyone know how I...

Encrypt/Decrypt password usage in a custom MembershipProvider?

Hi folks! I implemented a custom membership provider. I've also implemented my custom AES Encryption/Decryption overriding the abstract EncryptPassword/DecryptPassword of the MembershipProvider. however, when I trigger ValidateUser, the password is not automatically converted, am I missing something? Is it supposed to be called automa...

Testing Membership provider without ASP.NET

I have a ASP.NET MVC site using Membership Provider. I have trouble testing some functionalities including register a new user. The ASP.NET website doesn't have a way to delete/remove a registered user, so in my testing project (WatiN with NUnit), I am trying to delete a testing user account by calling Membership.DeleteUser(). Then I r...

How can I forms authenticate a user in a custom webservice?

I am working on integrating a silverlight site into our existing application and am trying to get the login functionality working. The Silverlight application needs to have it's own login page, and the login needs to utilize the existing ASP.NET forms authentication. As part of the login procedure, we are calling some external code, so...

How do I change the security paradigm for the MembershipProvider?

I'm wrestling with building a custom membership provider that allows me to have the security scheme I need. I have my own IPrincipal, IIdentity, and MembershipProvider. I have the authentication working fine. The problem I'm running into now is the authorization. The problem I have with the authorization scheme is inherintly in the I...

How do I setup a Membership Provider in my existing database using ASP.NET MVC?

For some reason, the idea of setting up Membership in ASP.NET MVC seems really confusing. Can anyone provide some clear steps to setup the requisite tables, controllers, classes, etc needed to have a working Membership provider? I know that the Demo that MVC ships with has an Accounts controller. However, should I be using this in my ...

ActiveDirectoryMembershipProvider configuration: duplicate name exists on the network

Hi all, I am trying to put a AD MembershipProvider to work but I am getting a very strange error: "Parser Error Message: You were not connected because a duplicate name exists on the network. Go to System in Control Panel to change the computer name and try again." Has anyone seen this? Obviously there are no other computers with cla...

Can SharePoint's Select People and Groups dialog box's Title and Department fields be customized with a custom membership provider?

I have created a custom membership provider for a SharePoint application but would like to populate the Title and Department columns for the MembershipUsers that are displayed with data from my user repository. Is this possible? How can it be done? I don't see anything in the System.Web.Security.MembershipUser class that could store t...

ActiveDirectoryMembershipProvider - "Unable to establish secure connection"

I am trying to configure an ActiveDirectoryMembershipProvider but I keep getting the message "Unable to establish secure connection with the server". I have seen online at the MSDN website that I should configure the trust level to unrestricted on my site and I still get that. Here is my example: <connectionStrings> <add name="...

Make a Linq-to-SQL Generated User Class Inherit from MembershipUser

I am currently building a custom Membership Provider for my Asp.net MVC website. I have an existing database with a Users table and I'm using Linq-to-Sql to automatically generates this class for me. What I would like to do is have this generated User class inherit from the MembershipUser class so I can more easily use it in my custom ...

ASP.NET Custom Membership Provider - Add User to Roles

I'm trying to implement a custom membership provider in my asp.net web app. The problem is that whenever I call the "Roles.AddUserToRole" method it writes to the default membership db built in asp. The strange thing is that when I call the "Membership.CreateUser" method it writes to my custom membership tables. No sure whats going, an...

Membership Providers and HIPAA Compliance

Does anyone know if the provided SQL and Active Directory Membership Providers in ASP.NET 2.0+ are HIPAA compliant? Clarification: I understand that HIPAA mandates patient information be secured and that certain policies be put in place to secure access to that information. Can Microsoft's SQL and AD Membership Providers be used for h...

How do we register users -- Facebook Connect users logging in the first time -- when we cannot get an email address from facebook?

Facebook Connect allows for very limited communication and access to the user's information. When a user logs in with Facebook Connect I would like to create an account for the user on our site that is linked up to their Facebook account. The only problem is registration (MembershipService.CreateUser(username, password, email)) requi...

Membership.CreateUser issue

There is an issue reported here http://stackoverflow.com/questions/481416/asp-net-membership-issues-with-registration which summarizes a situation I am experiencing. I'm not sure I understand the claimed solution. Simply put, after invoking this line: MembershipUser user = Membership.CreateUser(username, password, email, question, a...

ASP.NET Membership provider Tool

Is there any tool to configure membership providers in Web.config file from within VS2005? If yes, then How to use that? ASP.NET config tool only adds a provider but don't let it configure. ...

asp.net custom membership provider: IsOnline property

When implementing a custom membership provider I see that the underlying data model has ISONLINE column in the USER table, as described here: http://msdn.microsoft.com/en-us/library/6tc47t75.aspx Question: When is this field actually updated in the database? In the sample implementation MSDN gave, there is no updating of this column, a...