asp.net-membership

Login control and custom membership provider

I am working on implementing a custom membership provider that works against an existing schema in my database and have a few thoughts/questions. The login control will automatically call the ValidateUser method of the membership provider, so no matter how I implement the provider the only thing the login control cares about is the bool...

Does it make sense to build a custom AD profile provider?

Hi all, On my current project we are using the active directory as a user repository and using AzMan as the application authorization store. Both of these are cover with the Membership and the Roles providers (plus the AzMan for operations authorization). The only thing missing is getting detailed info about the logged user. I could us...

ASP.NET SqlMembershipProvider: Unique but not required email?

Is there a way to configure ASP.NET SqlMembershipProvider such that Email is optional but when provided must be unique? I only found the requiredUniqueEmail attribute (web.config) which makes Email mandatory. Do I have to leave this out and implement checking for existing email addresses myself in the account registration process? Or i...

asp.net membership controls, Login1_LoggingOut is not called when clicking logout

I have a loging control that is nested within a loginview. When I click the logout link, my method ` protected void LoginStatus1_LoggingOut(object sender, EventArgs e) { Guid guidUserId = AuthenticatedUser.LoginUserID; if (guidUserId != new Guid()) { PortalDataContext db = new...

Check a CheckBox using Membership ASP:NET

Hi, I have a GirdView listening all Users active in my system using ASP:NET Membership. I would like have a CheckBox that could be SELECTED or NOT depending if a specific user is APPROVED or not. With event handler RowDataBound, my script does not work. Any idea to selected the CheckBox in the appropirate case? Thanks for your time :-) ...

How to assign Page-wise privileges programmatically in asp.net?

I have an asp.net application which has web.config file in every folder of the application. Every folder has many aspx pages in it.I need to assign/deny privileges through coding for every individual pages of folders.The privileges is role based privileges.so some roles will have privileges to only some pages in each folder. Please help ...

How to SET MembershipUser.IsApproved Property using a CHECKBOX in a GRIDVIEW

Hi, I am new in ASP.NET. I need to SET MembershipUser.IsApproved Property using a CHECKBOX in a GRIDVIEW. With my code I am not able to make it. Could you guys have an idea? Please if you can Update some code. Thanks for your time! ASP PAGE <asp:GridView ID="uxUserListDisplayer" runat="server" AutoGenerateColumns="False" OnRowD...

LinkButton inside LoginView LoggedInTemplate, how to trap the Click event?

I have a master page that contains a LoginView control. In the LoggedInTemplate I have a link button. I would like to trap that click event and do some cleanup (kill session, forms auth, etc). No matter what I do for some reason the button event never fires, and the LoginView switches back to the AnonymousTemplate. The fact that the ...

Exception on Membership.GetAllUsers() after login: "Item has already been added"

Hi I have two sites running which share a membership provider. One of them is a ASP Playground site and the other is a site that have the ASP Playground Site Integration Package installed. Let's call them ASPPG site and SIP site. I sometimes get an error when I run Membership.GetAllUsers() on the SIP site. This method is overruled by t...

Cannot cast MembershipUser to custom class (ASP.NET)

I'm using the default SqlMembershipProvider, but I've created a custom MembershipUser class (SoeMembershipUser) because I needed a "DisplayName" property. All the DisplayName does is look at the UserName and format it differently. When I try to cast a MembershipUser to a SoeMembershipUser user I get an InvalidCastException. Exact error ...

Using a console application to host WCF endpoints that expose asp.net ProfileService, ProfileService and RoleService

Hi All, I've got an MVC web application that is used as an interface to a Console based app that exposes a bunch of ServiceHost/s using the net.pipe protocol. I would like to use the asp.net membership/role/profile provider to manage my users and their roles and profile information (Inside the Console Application). I've done this in q...

ASP.NET Membership Newbie Question

Good Day, I have an ASP.NET Membership web form with 3 fields: Username The Security Question A textbox field where the user enters the answer to the Security Question. I know that the PasswordAnswer is hashed/encrypted. Is there a way to determine if the user entered the correct answer? I tried the ValidateUser method, but that ...

Can DotNetNuke use another database with existing tables for ASP.NET default membership provider?

We have a case where a web site already exists and is using ASP.NET default membership provider storing Users' data on a SQL Server database. I need to add a new DotNetNuke site that can share the same membership tables with the existing site. Is there a way to do this cleanly where the Membership tables remain in the existing database ...

how to connect directly to aspnetdb database

I wanna connect to aspnetdb but it makes an error says "Login failed for user" this is the connection string in web config : <add name="UserProfiles" connectionString="Data Source=KIA;Initial Catalog=aspnetdb;Integrated Security=True;" providerName="System.Data.SqlClient" /> and this is my code: SqlConnection connection = new SqlC...

ASP.net redirect user on condition

Given my registration page: <asp:CompleteWizardStep ID="CompleteWizardStep1" runat="server"> <ContentTemplate> <span class="defHead">Thank You!</span><br /><br /> You are now registered on our system.<br /><br /> </ContentTemplate> </asp:...

Best Practice for handling multiple authentication providers for MVC ala stackoverflow

Hi All, I'm looking for suggestions on how to handle multiple auth providers like twitter, facebook, google, openid within an MVC app. What is the general idea? I've got my own user detail table and i'm currently using ASP.Net membership authentication. When someone connects with facebook are you able to extract user detail informatio...

Why use GetPassword() method but not Property of Password in build-in asp.net2.0 Membership

I find that the password can only retrieved by method GetPassword() in asp.net2.0 Membership. In fact, we can get the password when we get the user infomation from database and set it as a property of user(object of MemberhsipUser) just as user.Email, user.UserName, etc. It's clear that adopting the second resolution(property) can redu...

ASP.NET create user and remember me

Hi Using a CreateUserWizard (with only one step) and a logincontrol on the same page. But when i create a new user the Remeber me functionality dosent work (only if i log out and then log in again). I dont know if the persistant cookie is created. Im using this code behind: protected void CreateUserWizard1_CreatedUser(object sender, ...

Configuring an additonal sub login area with ASP.NET membership?

Hi, I have a main login for my client facing website configured with ASP.NET membership. I also have a secondary login for my admin backoffice called /admin with a login page /admin/login.aspx upon logging in it should direct to: /admin/secure/ I've placed a web.config file in /admin/secure/ as follows <?xml version="1.0"?> <config...

Membership provider properties not being read from web.config

I'm having a problem with a custom Membership implementation for ASP.NET using EF. The thing is, my web.config features the default values for the provider but at runtime those default are only being read in Initialize() the first time provider is instantiated (that happens for instance when I request the Register view via GET but when I...