membership-provider

Saving an email change within the default Membership Provider in ASP.NET MVC

我是研究僧i 提交于 2019-11-28 03:15:33
问题 I am trying to set and save an email change using within the Membership Provider in ASP.NET MVC 3. I do not know how to properly set and change the email property within the Membership Provider. MSDN seems to suggest the MembershipUser.Email Property as it, "Gets or sets the e-mail address for the membership user," but I do not know how to get this to function properly. I am attempting to use this code: // change email MembershipUser u = Membership.GetUser(User.Identity.Name); u.Email = email

Is it possible to change the username with the Membership API

徘徊边缘 提交于 2019-11-27 14:34:53
I am using the default sql membership provider with ASP.NET and I would like to provide a page to change the user's username. I believe I am sure I could do this with a custom provider, but can this be done with the default provider? Second part of my question is: Should I allow users to change their username after the account is created? It's true that the default SQL Membership Provider does not allow username changes. However, there's no intrinsic reason to prevent users from changing their usernames if you have a valid argument, on your site, to allow it. None of the tables in the SQL

ASP.NET MVC Custom Membership Provider - How to overload CreateUser?

◇◆丶佛笑我妖孽 提交于 2019-11-27 14:15:59
问题 I'm trying to build Custom Membership Provider. I would like to capture additional information (First Name and Last Name) during the registration and I'm not using usernames (email is a login). In my custom Membership Provider I'm trying to overload CreateUser method like this: public override MyMembershipUser CreateUser(string firstName, string lastName, string email, string password) { ... } But when I want to call it from the Account controller: [HttpPost] public ActionResult Register

How do I setup a Membership Provider in my existing database using ASP.NET MVC?

試著忘記壹切 提交于 2019-11-27 12:04:12
问题 For some reason, the idea of setting up Membership in ASP.NET MVC seems really confusing. Can anyone provide some clear steps to setup the requisite tables, controllers, classes, etc needed to have a working Membership provider? I know that the Demo that MVC ships with has an Accounts controller. However, should I be using this in my own project? What do I need to get my existing database ready if so? If not, how do I learn what I need to do to implement a membership provider? 回答1: Check out

“Membership.Provider must be an instance of ExtendedMembershipProvider”

旧时模样 提交于 2019-11-27 07:42:30
问题 I'm writing a MVC4 Website using Microsoft Visual Studio express 2012 for web. Whenever I run "Update-Database" in the Package Manager Console, the following Exception occurs: To call this method, the "Membership.Provider" property must be an instance of "ExtendedMembershipProvider". This is my Seed method: protected override void Seed(GNSystem.Models.DataContext context) { context.Forums.AddOrUpdate( new Forum { ForumName = "Hello" }, new Forum { ForumName = "World" }, new Forum { ForumName

How to add ASP.NET Membership Provider in a Empty MVC 4 Project Template?

瘦欲@ 提交于 2019-11-27 06:49:51
I am new in ASP.NET MVC4. I am creating a Empty MVC4 Project Template and trying to add ASP.NET Membership Provider into it but i am not understanding how can I do it. I am searching in Google but all demos are using Internet Application project template. I know this question is not good but i am already spend two days for it. Please give a some advice or tutorial for this purpose. Update According to Nesim Razon`s advice i copy and paste forms authentication sections to my empty project from a MVC4 Web Application (Internet Application template). But now i get an exception To call this method

Dependency injection and ASP.Net Membership Providers

≡放荡痞女 提交于 2019-11-27 06:48:53
I am in the process of creating a custom membership provider for an ASP.Net MVC website. The provider is being created as a separate class as part of a bigger library. There is a need for the back-end data store to be flexible as it could be an Xml File or SQL database. My initial thought was to create an interface for the data store and inject this into provider using dependency injection. The end result is required is that a developer can inherit the data store interface and provide the required methods to update the data, which will then be used by the custom membership providers. However

How can I customize simple membership provider to work with my own database ASP.NET mvc 4

倖福魔咒の 提交于 2019-11-27 05:15:34
问题 I’m exploring ASP.NET MVC 4 these days. I will be pleased if someone can help by answering my question . I am building an academic project "Project management and support system" . I have designed my own database , I have my own tables for the users in my database (two kinds of users : Employee who will execute tasks , and a client who assign/hire for tasks ) ,I was about creating a new membership provider but I realized that "It's a waste of time - reinventing the wheel". Now , I am building

How to combine using Membership API with own application related data?

自作多情 提交于 2019-11-27 01:54:10
Designing a new application in asp.net 4 I have to make a decision how to use a MS SQL Membership API along with my own data in the MS SQL data base. Firstly I need to store and access user profile data in more flexible manner then the Profile provider supports. Secondly I would like to link other user related information (e.g. Orders). No matter where you store your aspnetdb tables (in the separate data base or in the same data base with your data), the problem stays how to keep your data synchronized. After a research I see the following relevant options: 1. Foreign key UserId from asp_Users

ASP.NET Membership - login works locally, fails on Azure

大城市里の小女人 提交于 2019-11-27 00:56:58
问题 I'm working on an MVC3 site, and I've got a puzzling problem with ASP.NET Membership. I'm using System.Web.Providers 1.0.1 connected to a SQL Azure database. As it is now, the same username/password that logs me in when running under the Compute Emulator fails when running under Azure proper. I can see that it's using the right database, as the Failed Password Attempts counter in the membership database is being updated. 回答1: I tracked it down, thanks to some info in this article by David