asp.net-membership

Asp.net Membership - Accounts getting locked out

左心房为你撑大大i 提交于 2019-12-22 04:25:07
问题 We're using the standard ASP.net membership features that come with asp.net. Certain accounts in our membership database have a "Locked Out" flag set to true - when/how does this happen? 回答1: After a configurable number of failed logins (maxInvalidPasswordAttempts, default = 5) within a configurable length of time (passwordAttemptWindow, default = 10 minutes), the account will be locked out. see here for membership related configuration properties 回答2: These 4 guys did a great job of

Differences between Page.User.Identity vs Request.LogonUserIdentity

£可爱£侵袭症+ 提交于 2019-12-22 04:08:01
问题 What are the differences (behind the scenes) between Page.User.Identity and Request.LogonUserIdentity? Not the differences in type, name, etc but the differences in how they're implemented behind the scenes (i.e. one calls windows xxx api and the other calls asp.net xxx api...). 回答1: It depends on what mechanism you are using to authenticate users, and what settings you have for impersonation. For example, under the VS development server, using Forms authentication, the standard SQL

Implement Custom MembershipUser and Custom MembershipProvider

╄→гoц情女王★ 提交于 2019-12-21 21:04:10
问题 I try to implement a Custom MembershipPriver with a Custom MemberShipUser in my own database (with a specifics Users Table Model) : This is ly diffent files : iTwitterMembershipProvider.cs using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Security; using System.Collections.Specialized; using iTwitter.Models; public class iTwitterMembershipProvider : MembershipProvider { public override string ApplicationName { get { return _ApplicationName;

How to make sql membership provider and entity framework work using my database?

扶醉桌前 提交于 2019-12-21 20:33:32
问题 I have .NET MVC 3 project where I use sql membership provider and entity framework. I've created new database on my SQL server and created all objects for membership provider using aspnet_regsql.exe , I've changed my connection string and it works fine. Now I want to use entity framework for db interaction. I'm using Code-First so I created simple entity class and I can save data to db and retreive it. The problem is that the place where entity framework keeps it's data is a mistery. I can

ASP.net roles and Projects

吃可爱长大的小学妹 提交于 2019-12-21 17:02:09
问题 EDIT - Rewrote my original question to give a bit more information Background info At my work I'm working on a ASP.Net web application for our customers. In our implementation we use technologies like Forms authentication with MembershipProviders and RoleProviders. All went well until I ran into some difficulties with configuring the roles, because the roles aren't system-wide, but related to the customer accounts and projects. I can't name our exact setup/formula, because I think our company

How should I manage membership in my ASP.NET MVC 4 app?

不想你离开。 提交于 2019-12-21 16:19:55
问题 As I'm in the process of creating my first ASP.NET MVC 4 Internet application, I'm wondering how to best manage membership on the site. The app allows users to register and log on. I'm interested in finding out how to implement a complete solution for managing site membership, including an administrative user interface. How should I go about adding membership administration facilities to my app? I'm primarily considering two different NuGet packages to base my solution on, SecurityGuard.MVC4

Custom MembershipProvider: No parameterless constructor defined for this object

落花浮王杯 提交于 2019-12-21 12:38:15
问题 I have a custom MembershipProvider class that inherits from MembershipProvider that takes two parameters: public class CustomMembershipProvider : MembershipProvider { private readonly ISecurityRepository _securityRepository; private readonly IUserRepository _userRepository; public CustomMembershipProvider(ISecurityRepository securityRepository, IUserRepository userRepository) { ... } public override MembershipUser GetUser(string username, bool userIsOnline) { ... } ... etc } The config file

ASP.net membership add custom column

孤者浪人 提交于 2019-12-21 05:41:08
问题 In my master page I have: MembershipUser thisUser = Membership.GetUser(); loggedInUserID = thisUser.ProviderUserKey.ToString(); thisUser gives me access to all the fields in aspnet_Membership . I want a new field, isSubscribed for each user. I can use an SQL query to fetch the value fine, but I want to know if there is someway to modify the membershipuser object so it retrieves this value as well, so it is accessible from: thisUser.isSubscribed.ToString(); Thanks for any help! 回答1: you will

ASP.net membership add custom column

好久不见. 提交于 2019-12-21 05:41:06
问题 In my master page I have: MembershipUser thisUser = Membership.GetUser(); loggedInUserID = thisUser.ProviderUserKey.ToString(); thisUser gives me access to all the fields in aspnet_Membership . I want a new field, isSubscribed for each user. I can use an SQL query to fetch the value fine, but I want to know if there is someway to modify the membershipuser object so it retrieves this value as well, so it is accessible from: thisUser.isSubscribed.ToString(); Thanks for any help! 回答1: you will

userid from asp.net Membership Authentication?

a 夏天 提交于 2019-12-21 05:35:12
问题 I'm using the asp.net login control for user authentication. I also have the userID in many tables in my application and for now (development purposes), the userID is an int that I'm making up. However, I'd like to start using the userID of the framework in my tables. Where and how do I access the actual userID and what's its datatype? 回答1: Use the ProviderUserKey member of the MembershipUser object, like this: MembershipUser user = Membership.GetUser(); string id = user.ProviderUserKey