asp.net-membership

How to not use ASP.Net Membership Security Question and Answer for custom password recovery?

随声附和 提交于 2019-12-06 10:04:49
问题 I don't want to have the security question and answer feature that ASP.Net Membership Provider gives, but I DO want to enable a lost/forgotten password page. This page would be where a user would enter his/her email address and an email would be sent to that address if the user was registered for them to reset their password via a link sent to that registered email address I've created the custom table to track such requests, the random key assigned to the request as well as an expiry date on

How to use forms authentication without login control?

狂风中的少年 提交于 2019-12-06 09:10:29
问题 How to use forms authentication without login control.I don't want to use asp.net login control in my site.But i have to implement forms authentication and to validate users in my database. 回答1: I am assuming that instead of using a login control, you are using a few textboxes(eg username/password) and a logon button. The code could look something like this: In your aspx file <asp:Textbox runat="server" ID="Username"/> <asp:Textbox runat="server" ID="Password"/> <asp:Button runat="server" ID=

ASP.NET MVC Futures RequireSSL Attribute and Authorize Attribute Together

我的梦境 提交于 2019-12-06 08:55:12
问题 Is anyone successfully using both the Authorize and RequireSSL (from MVC futures) attributes together on a controller? I have created a controller for which I must enforce the rule that the user must be logged in and using a secure connection in order to execute. If the user is not on a secure connection, I want the app to redirect to https, thus I am using Redirect=true on the RequireSSL attribute. The code looks something like (CheckPasswordExpired is my homegrown attribute): [Authorize]

How to use MembershipValidatePasswordEventHandler?

时光怂恿深爱的人放手 提交于 2019-12-06 08:46:59
Is there any way to put some restriction on password selection while creating new user with asp. net Membership.?? Condition Like Password strength: Minimum of 8 characters, with character complexity enforced. ie: Not contain the user's account name Be at least eight characters in length Contain characters from three of the following four categories: English uppercase characters (A through Z) English lowercase characters (a through z) Base 10 digits (0 through 9) Non-alphabetic characters (for example, !, $, #, %) In this case, you need to make some modifications to your Web.config. Find the

Store ASP.Net access rules on SQL Server

大兔子大兔子 提交于 2019-12-06 08:41:41
So I know it's possible to store Users and Roles on SQL server but I was wondering if it was also possible to store the access rules on SQL Server . I've searched but I can't find anything. Our auditor requires us to run reports that tell us which users have access to which websites. Currently I am parsing each web.config file to see which users/roles have access, storing that in SQL server and running a report off of that but I am hoping there is a better way. Any input is appreciated. Thanks in advance. If you don't find any ready-to-use solution you can add an Application_BeginRequest that

Membership provider with different ApplicationName in area

旧城冷巷雨未停 提交于 2019-12-06 06:38:23
I have a web.config in my MVC3 application, I have an Admin area in my MVC3 application too. On the front end I hook asp.net users into a Customers table and my application relies on this table to operate. In the Admin area I have an Administrator Role and User but this login also works for the front end. I can create a customer for my Admin so my application doesn't fail but ideally I would like to separate the logins from the front and Admin area. I want to put a second web.config inside my Admin area that has a different application name so that the Admin account can never be logged into

How to add retry logic to ASP.NET Membership Provider for Azure SQL?

时间秒杀一切 提交于 2019-12-06 06:11:04
问题 We have a database of ASP.net sqlMembershipProvider based users on an Azure SQL database. It has become apparent that the out of the box sqlMembershipProvider 4.0 does not have the required retry logic for Azure SQL connections which can drop out due to throttling or can expire. It is possible to implement our own membership provider that has this functionality but it would have to be exactly the same database interactions as the standard sqlMembershipProvider 4.0 in order to work with the

Password Recovery without sending password via email

浪子不回头ぞ 提交于 2019-12-06 05:43:24
问题 So, I've been playing with asp:PasswordRecovery and discovered I really don't like it, for several reasons: 1) Alice's password can be reset even without having access to Alice's email. A security question for password resets mitigates this, but does not really satisfy me. 2) Alice's new password is sent back to her in cleartext. I would rather send her a special link to my page (e.g. a page like example.com/recovery.aspx?P=lfaj0831uefjc), which would let her change her password. I imagine I

ASP .NET anonymous users not getting stored in database

给你一囗甜甜゛ 提交于 2019-12-06 05:19:50
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? 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/710701/asp-net-anonymous-users-not-getting-stored-in-database

How can I configure membership provider to insert data on my own database

旧时模样 提交于 2019-12-06 04:45:49
How can I configure membership provider to insert data on my own database Justin Niessner Write a custom Membership Provider to use your custom database (if you want to use a completely different database schema) or follow the steps here: How Do I Change My ASP.NET Membership Database You can create a custom MembershipProvider to deal with a custom authentication system. You have to implement a bunch of methods. Here is an example public class DreemMembershipProvider : MembershipProvider { ... public override MembershipUser CreateUser(string username, string password, string email, string