asp.net-membership

ASP .NET authentication against Active Directory and Roles via ASP.NET role provider

Hello, In my current project, we need to authenticate users of an ASP.NET application against Active Directory. I think it can be achieved using the membership provider without too much problems. but we need also to manage user roles that will be kept in the ASP roles management tool. Did anyone implement this configuration? Does it lo...

How could I setup users in Membership Services from a Desktop application

This is odd, but we have written an asp.Net web application (all's well there) but now we are importing a large amount of data, and in this case, users with existing usernames and passwords. The import is being done with a desktop application. I need to take each user from the old system, and create a corresponding user in the new syst...

Override Role Provider - ASP.NET

Edit: By Overriding the RoleProvider we were hoping to still use the same methods with our new methods. Such as Roles.GetRolesForUser(int). string[] myRoles3 = ((PortalRoleProvider) (Roles.Provider)).GetRolesForUser(2); That above code seems a bit excessive ? I have a class which overrides some members of the RoleProvider and adds ...

ASP.NET access controls

I am trying to build an ASP.NET 3.5 website that allows users to log in and browse a couple of pages. I would like to restrict certain users to be able to view certain pages but I'm having trouble coming up with a custom and flexible system. I have seen MS's version of this but it's not what I am looking for. Can anyone direct me to some...

ASP.NET Website Membership

Hi, We're hitting a good number of walls and stumbling blocks as we create our custom Membership based upon MembershipProvider, MembershipUser and RoleProvider etc. We have a number of interesting requirements and Membership Provider doesn't appear to be helping us much in achieving them: Users may have multiple Logins. Users don't ha...

Require user to login to view document using ASP.NET

I am working on a site that needs to restrict access to pages and documents(.pdf, .doc, etc) to registered users. We are using the ASP.NET Membership classes to do this. But, I'm having trouble getting it to work how I would like if someone clicks a link to a document before they are logged into the site. Currently, they will be taken to...

.NET Membership: Best way to Implement "I know you but you're not logged in"

Sites like ebay and amazon.com Know who you are with a message like Hello, Bob. Please log in. ... but they also know you haven't authenticated yet for this session. What is the best way to implement this in an ASP.NET application using the Membership API/Framework? I can think of a few ways to go here, but my primary concern is to no...

ASP.NET MembershipUserCollection sort by IsApproved, Comment

Hello, Is it possible to sort a MembershipUserCollection by IsApproved and then Comment without modifying the Stored Procedure? Can Linq do this? Thanks! ...

CustomProfile is not saving?

I created a class that extends ProfileBase: public class CustomerProfile : ProfileBase { public int CustomerID { get; set; } public string CustomerName { get; set; } public static CustomerProfile GetProfile() { return Create(Membership.GetUser().UserName) as CustomerProfile; } public static CustomerPr...

What method of CreateUserWizard calls the Membership.CreateUser?

Hi there! I made a Custom Membership Provider, with a custom CreateUser method that accepts one more argument, like this: public class CustomMembershipProvider : MembershipProvider { // code public override MembershipUser CreateUser(string username, ...

User can't login after creating them with the asp.net Create User Wizard

When I create a user, they can't login until I go into the asp.net configuration and save them. I actually don't change any settings, I just press the save button and then they can login in. What I would like to do is to have the user be able to login once they are created, but I can't seem to get it to work. Here is my code for the C...

SendingMail is not being called when user is created from the CreateUserWizard Control in asp.net?

I have the OnSendingMail event declared in the CreateUserWizard markup. I have the code in the code-behind file as well as the mail settings in the web.config, yet if I put a break point on the SendingMail method, it doesn't even hit the break point and I can't figure out why it is not happening. Here is my SendingMail method: protect...

Asp.net Membership: Different account types

Hello, I have an application where users can store items. Now each type of account can store a limited amount of items. For example basic account can store 25 items, premium can store 50 and max can store unlimited items. Now my question is what would be the best approach to do this? At first I was thinking of just making different ro...

How to effectively validate Asp.Net membership forms

What are other suggestions and sample code for efficiently validating the Register and/or login page. Perhaps use of jQuery? I would like to use some ajax to inform the user the email address is in use for example. Register.aspx <asp:ValidationSummary ID="ValidationSummary1" runat="server" ValidationGroup="CreateUserWizard1" /> <asp:Cu...

How to get aspnet_Users.UserId for an anonymous user in ASP.NET membership ?

I am trying to get the aspnet membership UserId field from an anonymous user. I have enabled anonymous identification in web.config : <anonymousIdentification enabled="true" /> I have also created a profile: <profile> <providers> <clear /> <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider, S...

Securing temporary passwords sent through e-mail to users?

I have a simple web application set up where admins can create users. Users do not create themselves. All an admin has to do is enter a username and an e-mail and a temporary password is sent to the user for them to login. This e-mail is sent in plain text format. If the user is logging on for the first time, they are required to chang...

Migrating asp.net web site breaks Membership Provider

I have a asp.net web site that was developed on the .Net Framework v2 connecting to sql server 2000. I am trying to migrate it to a new server that has the .Net Framework v3.5 on it along with sql server 2008. I backed up the database and restored it to the new database server. I moved the web site and updated the web.config. Now however...

Storing a Windows SID in a Database for Lookup

I have an ASP.NET MVC application where I need to allow to customers configure MembershipProviders based on their environment, but still be able to map that MembershipUser to a concrete User model in our database. Membership.GetUser() will give me access to the logged-in user's Membership.ProviderUserKey. I can use this to relate to a U...

Simple Logon System using Membership provider

I have a website which requires pretty simple logon restriction to a set folder (2 users) I'd like to use the Membership provider but have a sql DB (While easy and painless) seems a bit of overkill. Is there a simpler way of doing this? without re-writting the membership provider. ...

ASP.NET User management templates

I've built a few ASP.NET sites that all use Users/Roles membership providers. These are working great, however for advanced user management tasks i have to go into the VS IDE and open the "Web Site Administration tool" My question is, does anyone know of a template or set of prebuilt aspx pages out there that i can publish to a secure f...