membership-provider

ASP.NET Membership ChangePassword control - Need to check for previous password

帅比萌擦擦* 提交于 2020-02-23 11:52:18
问题 I have a new table that hold old passwords, I need to check if there is a match. If there is a match I need the ChangePassword contol to NOT change the password. I need to tell the user that this password was used and pic a new one. I can't seem to be able to interrupt the control from changing the password. Maybe I am using the wrong event. Here is a piece of my code, or how I wish it would work. I appreciate all your help. protected void ChangePassword1_ChangedPassword(object sender,

Default Role Provider could not be found on IIS 7 running .NET 4

若如初见. 提交于 2020-01-22 15:27:06
问题 Good morning all, I am attempting to implement my custom membership and role providers in my web application that I have implemented under the Default Web Site in my instance of IIS 7. My web application is running under a .NET 4 application pool. However, after setting up the corresponding web.config, I get the following error: Parser Error Message: Default Role Provider could not be found. I have included the following block of code in the system.web section of the corresponding web

ASP.Net membership Provider: Custom Create User

[亡魂溺海] 提交于 2020-01-17 03:55:06
问题 My textbook states that the default for a valid password, "requires that you enter at least seven characters with one of them being a non-alphanumeric." I am definitely doing that. The error I'm getting is, "The password answer supplied is invalid." Here is the code in the aspx file: <div id="loginBlock"> First Name: <asp:TextBox ID="fname" runat="server"></asp:TextBox>   Last Name: <asp:TextBox ID="lname" runat="server"></asp:TextBox><br /> Username: <asp:TextBox ID="userName" runat="server"

Custom Membership provider & MVC 4

妖精的绣舞 提交于 2020-01-17 03:52:47
问题 Continue from this solution : How to configure Ninject for MVC4 & custom Membership provide? I declare public interface IUserRepository : IRepository<UserModel> { MembershipUser CreateUser(string username, ... , string providername = null); void Logout(); Boolean Login(string userName, string Password, bool persistCookie = false); bool RegisterUser(UserModel user); } And implement within UserRepository public class UserRepository : RepositoryBase<MyDbContext, UserModel>, IUserRepository {

Implement custom “ValidateUser” in MembershipProvider

送分小仙女□ 提交于 2020-01-16 05:11:46
问题 I am implementing a custom MembershipProvider and I am trying to get the ValidateUser method to validate against my Profiles table in SQL Server. This table has columns called UserName and Password . public override bool ValidateUser(string username, string password) { ??? what to do here??? } FYI, I am using MVC3 & EF 4.1 Code First. Thanks Paul 回答1: If you're using EF 4.1, you will have some kind of a DbContext object that contains the DbSet for your Profiles table - right? So in that case,

Sitecore Custom Membership Provider

我的梦境 提交于 2020-01-15 07:34:06
问题 We have a need to use an existing external database for our membership needs. This database will contain all the basic information needed to authenticate and authorize users. I'm looking to see if you have documentation that can guide me through this process. I've seen posts online for custom membership providers implementation. But I haven't seen examples on how to integrate the custom membership provider with Sitecore API so Sitecore.Context.User will return the information of the logged in

Unknown column 'Extent1.Discriminator' in 'where clause'

六月ゝ 毕业季﹏ 提交于 2020-01-06 03:35:06
问题 I am using Visual Studio 2013 web form application with MySql database to build a web form application but I have been unable to get passed 'Membership and Role Management'. I used a database first approach for the membership and when I try registering a new user, I get the error message below: Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Unknown column 'Extent1.Discriminator' in 'where clause'

╄→尐↘猪︶ㄣ 提交于 2020-01-06 03:35:05
问题 I am using Visual Studio 2013 web form application with MySql database to build a web form application but I have been unable to get passed 'Membership and Role Management'. I used a database first approach for the membership and when I try registering a new user, I get the error message below: Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

asp.net custom membership provider: IsOnline property

社会主义新天地 提交于 2020-01-05 03:28:30
问题 When implementing a custom membership provider I see that the underlying data model has ISONLINE column in the USER table, as described here: http://msdn.microsoft.com/en-us/library/6tc47t75.aspx Question : When is this field actually updated in the database? In the sample implementation MSDN gave, there is no updating of this column, and IsOnline property is calculated as: return (now - userIsOnlineTimeWindow > LastActivityDateTime ? false:true); So what is the purpose of ISONLINE column in

System.NotSupportedException: Specified method is not supported

放肆的年华 提交于 2020-01-03 13:11:08
问题 Is it possible to get the password of a user? How, please? When I've tried this code : WebSecurity.InitializeDatabaseConnection("nectarys-pc.MonitoringN.dbo", "Superviseur", "UserId", "matricule", autoCreateTables: true); var membership = (SimpleMembershipProvider)Membership.Provider; model.motDePasse = membership.GetUser(superviseur.matricule, false).GetPassword(); This exception appears in the last line : System.NotSupportedException: Specified method is not supported. How to deal this?