membership

Membership.ValidateUser is Slow

人走茶凉 提交于 2019-12-06 03:13:53
I am using the System.Web.Sercurity.Membership methods to deal with users of our web service. I was very happy with it during testing as our database and web service resided on the same server. When the database and web service where moved to separate servers we are getting a massive delay when we are authenticating users with the Membership.ValidateUser(username, password) command. Config file details: type="System.Web.Providers.DefaultMembershipProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=*********" connectionStringName="BlaBlaConnection"

Why can't anonymous unions contain members with non-trivial constructors/destructors?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-06 02:24:36
问题 I may be mistaken, but the basic explanation I've found has been that the union can't initialize because it doesn't know which member's constructor to call. The compiler can not automatically generate a constructor for the union. Why is the user not allowed to define the unions constructor? This would remove said issue and allow the presence of union members that have a non-trivial constructor/destructor. Also, why can't a union member have any custom constructors? The previous explanation

Hashed passwords and PasswordRecovery control

纵然是瞬间 提交于 2019-12-05 19:48:25
1) firstUser was created when membership module had requiresQuestionAndAnswer set to false, while secondUser was created when requiresQuestionAndAnswer was set to true. If we try to recover pwd via PasswordRecovery PR control and we set requiresQuestionAndAnswer to true, then PR doesn’t email password to firstUser, but it does to secondUser. If we set requiresQuestionAndAnswer to false, then PR does email pwd to secondUser (it skips the question/answer stage). But why doesn’t PR also email pwd to firstUser? 2) I’ve read somewhere that if membership provider stores password in hashed form, then

Restrict Area to a given role

旧城冷巷雨未停 提交于 2019-12-05 16:43:12
I have an area setup in MVC2, called Admin/ , which I want I only want Users who belong to the role "admins" to have access. I know I can decorate each of the methods with [Authorize(Roles="admins")] , but this seems tedious when your talking about multiple controllers with multiple actions. Is there an better and cleaner way? You could define a base controller decorated with this attribute that all controllers in the area derive from. 来源: https://stackoverflow.com/questions/3291385/restrict-area-to-a-given-role

How to remove device from apple developer account while resetting device list

偶尔善良 提交于 2019-12-05 12:25:17
We have already reached to iPhone device limit so we are not able to add new iPhone to our developer accounts device list. We have renewed our membership for our apple's developer account. and it is asking us to reset our device list. but when we proceed to reset device list, but we are not able to remove device from device list. but on next page it is not changing the count of no of devices able to register So it is confusing for me will it remove the deselected devices and let me add new devices instead of them or the it will just disable them. I'm about to go through same process. The page

ASP.NET Forms Authentication With Only UserName

痴心易碎 提交于 2019-12-05 10:35:54
问题 I have a bit of a hybrid situation on my hands. I'm writing an intranet asp.net web app. I don't want to use full blown Windows Authentication, because I don't have proper groups set up in Active Directory to be able to authenticate users simply based on what group they are in. Up until now, I had created a membership database, and was manually authenticating users based on their NT Login. The app is getting more complex, and I'm looking at using the Membership and Roles providers to

Assign User-objects to a Group while editing Group-object in Django admin

别等时光非礼了梦想. 提交于 2019-12-05 07:01:42
In the default Django admin view for user-object (edit user) one can edit the user's group memberships. What if I wanted this the other way around also? I.e. in the group editing page one could select the users that belong to the group being edited. As I see this, Django doesn't have a ManyToMany mapping from Group to User object which makes it impossible(?) to implement a ModelAdmin class for this particular case. If I could make an additional UsersOfGroup model class and use it in the Django's Group model's ManyToMany field as a through-attribute, there could be a way. Any ideas, is this

ASP.NET FormsAuthentication and membership

一笑奈何 提交于 2019-12-04 20:17:32
I can use forms authentication in ASP.NET without membership. i.e: FormsAuthentication.RedirectFromLoginPage(usuario.UsuDs, false);//usuario.UsuDS is the textbox username in login's form Then i can write code like: [Authorize(User="UserTest")] public ActionResult Criar(Usuarios usuario) { try { ... } ... } And it only authorize "UserTest" user in especific views. However,i would like to write: [Authorize(Roles="Admin")] public ActionResult Criar(Usuarios usuario) { try { ... } ... } But i cant set roles without Membership. Any ideias to set and get roles from ASP.NET without membership? You

Implement Custom MembershipUser and Custom MembershipProvider

烈酒焚心 提交于 2019-12-04 17:21:47
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; } set { _ApplicationName = value; } } public override bool ChangePassword(string username, string

ASP.NET Universal Providers - Roleprovider does not cache roles in cookie

落花浮王杯 提交于 2019-12-04 15:09:04
Ironically my role provider does not cache the roles in a cookie anymore. That was working earlier. Unfortunately i have noticed that only now, so i cannot say what causes the problem. But i think it has to do with the update to the new version 1.2 of the universal providers (released on 16th august). My config for the roleprovider looks like: <roleManager enabled="true" cacheRolesInCookie="true" cookieName="X_Roles" cookiePath="/" cookieProtection="All" cookieRequireSSL="true" cookieSlidingExpiration="true" cookieTimeout="1440" createPersistentCookie="false" domain="" maxCachedResults="25"