asp.net-membership

ASP.NET MVC Custom Membership Provider "CreateUser" problem

Hi! I've implemented some basic, custom membership provider for my ASP.NET MVC application so I thought that all validation will be done in my custom code. Unfortunately when I'm trying to create new user by calling function: Membership.CreateUser(user.UserName, user.Password, user.Email, null, null, true, Guid.NewGuid(), out status...

ASP.NET Membership/Role providers for MySQL?

I am not at all familiar with ASP.NET membership/roles. This is my first time using it, and my first time trying ASP.NET MVC. When I create my first project for MVC, it gives me a lovely template to create an account. I was excited to see that I did not have to do this manually. However, it failed because it cannot connect to SQL Ser...

User still exists in Roles.GetUsersInRole after DeleteUser() with deleteAllRelatedData=false

I have an account called "admintest" which is "admin" as its role. I called the following line to delete the user with deleteAllRelatedData=false because I just want to mark the user as deleted (I may need to retrieve users' history later) bool result = Membership.DeleteUser("admintest", false); After that, I call the following line t...

How to allow multiple authentication methods in ASP.NET?

I'm building a new ASP.NET MVC application (in C#) and one of the requirements is to create a new database of members. For this, we'd need roles to manage the different types of members and profiles to manage the additional metadata attached to each member. So far so good, just use the standard MembershipProvider, RoleProvider and Profil...

ASP:Login Not Authenticating

I am currently learning form authentication using a SQLMembership provider. The ASP:Login control does not seem to authenticate. Here is the structure of my test site on my local machine: ~/LoginTest/ Default.aspx CreateUser.aspx lostpassword.aspx web.config /login/ Login.aspx ProtectedStuff.aspx web.config In ...

Odd RoleProvider Behavior

I have a roleprovider set up as follows using a DataContext. On my View, I have the following user Control... <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> <% if (Request.IsAuthenticated) { %> Welcome <b><%= Html.Encode(Page.User.Identity.Name) %></b>! <%= Html.ActionLink("Logout", "Logout", ...

ASP.NET 'Guest' Membership

Is it possible to specify what is returned by RoleProvider.GetRoles() if a user is not logged in? I was thinking in case of a 'Guest' user account. ...

Would like to implement Membership API to existing web site

I have an existing ASP.NET web application that is for public use and any anonymous user can access it. I would like to implement mechanism for users to sign up. The first thought that crossed my mind is to use the ASP.NET membership API. So, If I use the Membership API: Can I integrate it with an existing SQL express database? I woul...

When is it a good idea to store passwords in clear text?

I am working on an application that is targetted at non technical users. I expect a large number of support calls regarding lost passwords and inability to login. I am using ASP.NET membership provider that provides 3 options for storing passwords - Clear text, Hashed, Encrypted. Is it a good idea to store passwords in clear text given...

Has anyone written or used a Asp.NET membership provider that integrates with Facebook Connect?

I'm looking to allow Facebook Connect logins on my site, but still want to capture some user information and store it in the Profile object. Would also like to allow standard login/pass authentication, with an option to link it to your Facebook account. Much like the way many sites handle Facebook Connect... I'm wondering if someone ...

Graphical Interface for adding users to aspnet_Membership and aspnet_Users etc

Hi everyone, This might be a pretty basic question, but how do you add new users to the aspnet_Users table in a ASP.Net 2.0 app? I know I could do it using a SQL script, and being mindful of the associations, but I know I've seen a graphical interface for it... I can't find code for adding new users in the web app I'm maintaining (it ...

CreateUserWizard - Change position of the validation message

I am using a CreateUserWizard. By default, the validation error messages are shown in the bottom of the control. Can I change this positioning to be shown above the control so that it is consistent with my other pages? When a user fails to enter a required fied, it displays a asterisk * next to the field. Can I have it also display so...

How to set Request.IsAuthenticated to true when not using FormsAuthentication.RedirectFromLoginPage?

I am using Form Authentication and sending an Aajx request to the server for authentication. Based on the json result, the client decides where to go and what to do. That is the reason I am not using FormsAuthentication.RedirectFromLoginPage to not interfere the ajax/json response. In this case Request.IsAuthenticated returns false, eve...

ASP.NET Membership Stop redirecting to Destination URL if user is not in specified role

My system has different users, superadmin, admin, member, anonymous user. In some pages, I want only admin users to login. If member logs in, I don't want to redirect them to destination URL. How can I stop the redirect? ...

Module Based Security

I am trying to create an application that is based on module level security. The idea is we would have a user login, grab there roles, grab the pages those roles have access to then in those pages grab the modules they have access to then the functions inside the modules they have access to (list, create, edit, delete). That way in an ad...

Problem invoking custom membershipprovider from aspx page deployed in Sharepoint

Hi, I've implemented custom membershipprovider and roleprovider I use with Forms auth on a Sharepoint site. This works fine, and Sharepoint invokes methods on both custom providers without problems. I'm trying to use Membership.CreateUser from a new aspx page deployed to Sharepoint but this fails with "The membership provider name spe...

.Net RoleProvider without the connectionString

I would like to use .Net's SqlMembershipProvider and SqlRoleProvider for user management in my application. My issue is that when the application starts, it does not know any db connection information. For security purposes, it needs to get this information from a WCF service that is running on the datbase server. Therefore I need to bui...

Login control and ValidationSummary with Master Pages

When the Login Control is used with MasterPages, the ValidationSummary does not show the validation messages. I have set the ValidationGroup property to the ID of the Login control. I tried using the approach at Link with no luck. Thanks ...

Is it possible to use .ASPXAUTH for my own logging system?

For a web application I switched from using ASP.NET Membership to using my own log in system which just does something like this to mark a user as logged in: Session["UserId"] = User.Id Is it possible to store the user id in the ASPXAUTH cookie, piggybacking on its encryption, instead of using the standard session? The goal is for th...

How to map part of aspnet_Users table using Fluent NHibernate

I'm trying to get Fluent NHibernate 1.0 RTM to map a User entity for me so that I have access to UserId and UserName inside my ASP.NET MVC application via NHibernate. I have: public class User { public virtual Guid UserId { get; protected set; } public virtual string UserName { get; protected set; } } It represents the aspnet...