asp.net-membership

List of online users using membership asp.net

老子叫甜甜 提交于 2019-12-10 10:54:55
问题 I want to have a list that contains online users in my web site i use this code in local host but it did't shows me any user. Can any body help me? where did i make mistake? MembershipUserCollection users; if (!IsPostBack) { // Bind users to ListBox. List<MembershipUser> onlineUsers = new List<MembershipUser>(); foreach (MembershipUser user in Membership.GetAllUsers()) { if (user.IsOnline) { onlineUsers.Add(user); } } ListBox1.DataSource = users; ListBox1.DataBind(); 回答1: Try changing this

ASP .NET anonymous users not getting stored in database

这一生的挚爱 提交于 2019-12-10 10:38:36
问题 I'm trying to setup anonymous users in MVC. For some reason it wont store the users in the database. I have added the following in the web.config <anonymousIdentification enabled="true" /> It successfully creates the .ASPXANONYMOUS cookie when i visit the site but doesn't create the user in the database. Is this something i have to do manually? 回答1: It will be stored if you will try to save some data like for example something in this user's profile. 来源: https://stackoverflow.com/questions

Why CreateUserWizard Control automatically adds the ASPNETDB.MDF database?

丶灬走出姿态 提交于 2019-12-10 10:37:59
问题 I only want to use CreateUserWizard Control to collect information from the user and insert into my custom database. I don't want to use Asp.Net Membership . When I add this setting to the web.config <membership> <providers> <clear /> </providers> </membership> The following error comes Default Membership Provider must be specified. And when I remove this setting from the web.config. The page runs successfully BUT createUserWizard Control automatically adds the ASPNETDB.MDF database to the

Membership.ValidateUser always return false on IIS

两盒软妹~` 提交于 2019-12-10 03:41:39
问题 Membership.ValidateUser methods works on development server both(iis express and cassini). But on my IIS (its publishing as an application on my development machine) It always return false . Even user is approved,not locked and username and password are correct. There is no trace error. ? http request 1: davutg-pc: 6423 /BpmService/Login?userName=abc&password=0035 result 1: < boolean > true < /boolean > http request 2: davutg-pc/BPM/BpmService/Login?userName=abc&password=0035 result 2 : <

Non RBAC User Roles and Permissions System: a role with properties

℡╲_俬逩灬. 提交于 2019-12-09 13:03:13
问题 We are currently designing a User Roles and Permissions System in our web application (ASP.NET), and it seems that we have several cases that do no fit within the classical Role-Based Access Control (RBAC) . I will post several questions, each devoted to a particular case. This is my second question (the first question is here: Non RBAC User Roles and Permissions System: checking the user's City). We have the following case: we need to implement a Manager role in our web application. However,

MVC 4 SImpleMembership with LDAP

被刻印的时光 ゝ 提交于 2019-12-09 11:59:37
问题 I'm looking to try out using simpleMembership but connect it to our LDAP. I haven't seen anything online about doing this, only with SQL. Does anyone know if it's possible and could lead me in the right direction? 回答1: I think you'd need to create a class which inherits from ExtendedMembershipProvider and write the LDAP implementation. There's no built-in LDAP support. See this post for more information on how SimpleMembership works in ASP.NET MVC 4. 回答2: I'm not certain, but

Why does asp.net membership have a users table and a membership table?

做~自己de王妃 提交于 2019-12-09 09:25:44
问题 Why do they split up the users stuff into 2 tables? Like they got aspnet_ membership and aspnet_users. Is it just because the membership stuff they have is so long? 回答1: It's to separate identity/authentication management from membership management. The "big" user table is the actual identity repository - e.g., if you want to use SQL to store your identity data, it all goes in here. But you may want to use some other source - say, Active Directory - to be your identity repository. You

what's differences between “forms timeout”, “membership userIsOnlineTimeWindow” and “sessionState timeout”

泪湿孤枕 提交于 2019-12-09 09:25:24
问题 What is the difference between these lines of code: <forms timeout="5" /> <membership userIsOnlineTimeWindow="5" /> <sessionState timeout="5" /> Thanks a lot. 回答1: Forms (FormsAuthention) are used for authentication and when it times out it will logout user. You can 'prevent' timeout by setting SlidingExpiration property to 'true' and it will renew forms ticket on user activity (read request to asp) if needed. This will keep user logged on while he is 'active' on your site. Membership is used

Hashed or Encrypted passwords are not supported with auto-generated keys

南笙酒味 提交于 2019-12-09 05:39:34
问题 I have create a Membership provider and changed my web.config to <membership defaultProvider="MyMembershipProvider"> <providers> <clear/> <add name="MyMembershipProvider" type="Khafan.Providers.SqlMembershipProvider" connectionStringName="KhafanConnectionString" maxInvalidPasswordAttempts="5" passwordAttemptWindow="10" minRequiredNonalphanumericCharacters="0" minRequiredPasswordLength="4" passwordStrengthRegularExpression="" passwordFormat="Hashed" enablePasswordReset="true"

ASP.NET Membership Alternatives

余生颓废 提交于 2019-12-09 05:39:28
问题 I have always stayed away from asp.net membership as it seemed bloated, and (at the time) untestable. In the case of asp.net MVC specifically, does anyone use an alternative solution for assigning roles to users, and storing some addition information for the logged in user? Any recommendation? Is it crazy to just roll your own, just implementing the functionality you need? 回答1: ASP.NET membership uses a provider model for the storage. SqlMembershipProvider inherits encrypting/hashing password