membership-provider

Can I add a column to Membership Provider's tables to store a user's face picture?

半世苍凉 提交于 2019-12-13 22:37:22
问题 Should I add a column to users table to store user face pictures? Or should I create a new table to save face pictures? 回答1: You cannot alter Memebership's tables. If you add/edit/delete a column of one of those Membership tables, Membership Provider will stop working. Instead, you want to create your own table, and make UserID of Membership's Users table as primary key as well as foreign key (which is basically one-to-one relationship). Here is an example - 来源: https://stackoverflow.com

Modifying ProfileBase ConnectionString dynamically

孤者浪人 提交于 2019-12-13 18:07:37
问题 I have the following code, which I want to use to modify the ProfileBase connectionString: ProfileBase profile = ProfileBase.Create(username); string _connectionString = (_DataModel.Connection as System.Data.EntityClient.EntityConnection).StoreConnection.ConnectionString; FieldInfo connectionStringField = profile.Providers["MySqlProfileProvider"].GetType().BaseType.GetField("_sqlConnectionString", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);

How do i run aspnet_regsql on sql azure? [duplicate]

耗尽温柔 提交于 2019-12-13 11:41:28
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Migrating ASP.NET Membership Database to SQL Azure How do I run aspnet_regsql on sql azure database? I made it work the hard way, by exporting all db objects over. However, I seriously believe that there's an easier way. Please help. 回答1: When you run aspnet_regsql on sql azure database, the error occurs only because SQL Azure does not support the USE statement to switch database contexts when it executes

Writing my own Provider Class in ASP.NET

微笑、不失礼 提交于 2019-12-13 05:24:12
问题 Note: I DON't want to write custom membership provider. I want to write my own Provider class so I can define it in web.config and access it like Membership class. Here is a sample of my class (it has many other static methods): public static class MySqlHelper { private static string constring = ConfigurationManager.ConnectionStrings["MyConnString"].ConnectionString; public static int ExecuteNonQuery(string mysqlquery) { SqlConnection conn = new SqlConnection(connString); SqlCommand cmd = new

How can I use the same encryption that asp.net mvc4 uses?

半世苍凉 提交于 2019-12-13 04:58:50
问题 Yes hashing is better but... So I knew I would regret this but here we go. I started a new project and decided I would use the built-in Microsoft membership stuff in MVC 4 (BasicMembership) so that I didn't have to write the registration, login, oauth, etc... Now I want to modify some of this behavior and use as much best practice as possible. This came about because I decided I would need to associate multiple users under 1 parent (company) - I know I can do all of the work in the controller

Custom membership that uses web service for authentication

断了今生、忘了曾经 提交于 2019-12-13 03:44:35
问题 I'm building web portal in ASP.NET MVC 3 that uses distant web service as only way to communicate with database. Web service has requirement to always have Username/Password passed in request header, otherwise it rejects the call. I have overridden ASP.NET Membership so that my ValidateUser method sends Username/Password to web service Login method, and returns true/false if authentication is successful. It works quite nice with AcountController provided with MVC 3 Empty internet template.

ASP.Net MVC 3 Membership.UpdateUser(MembershipUser user)

£可爱£侵袭症+ 提交于 2019-12-13 02:48:01
问题 i have a project that use MVC3. in my project, i have a page that user can edit their account (UserComment, UserEmail, IsLocked, IsApproved). i already make the View for Edit Account. i have some trouble to make the Edit Controller. here's my code: [HttpPost] public ActionResult Edit(string id, FormCollection collection) { id = id.Replace("+", " "); var user = Membership.GetUser(); Guid UserGUID = new Guid(user.ProviderUserKey.ToString()); var SysUser = db.System_User.Single(u => u.User

How do I set minumum password requirements in Umbraco for the membership provider?

删除回忆录丶 提交于 2019-12-12 19:07:37
问题 I am trying to set minimum password requirements for my membership provider in Umbraco. Currently my web.config membership section looks like this: <membership defaultProvider="UmbracoMembershipProvider" userIsOnlineTimeWindow="15"> <providers> <clear /> <add name="UmbracoMembershipProvider" type="umbraco.providers.members.UmbracoMembershipProvider" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" defaultMemberTypeAlias="Another Type" passwordFormat

Membership Provider ChangePassword Method Return Type Problem

て烟熏妆下的殇ゞ 提交于 2019-12-12 17:33:24
问题 We have implemented a Custom Membership provider and have a change password control on a webpage that uses this provider. The ChangePassword method in this membership provider class checks some business logic about password strength and validity by connecting to an external webservice. The webservice has the ability to return exactly what is wrong with the new password if any (length problems, special character required etc.). Now, the signature of the ChangePassword method that has to be

ASP.Net MVC3 Azure - Do I Need Membership Provider Stored Procedures?

∥☆過路亽.° 提交于 2019-12-12 12:26:02
问题 I am creating my first ASP.Net MVC3 Application using Azure as DB Storage. There are a number of great tutorials but I'm currently using this one: Walkthrough: Hosting an ASP.NET Web Application on Windows Azure I've got my connection string hooked to Azure and its working fine. I run the application in Debug mode and "Register" my first user via the Membership Provider. According to the walkthrough, "Creating an account causes ASP.NET to create the membership database." Success! I now see