membership-provider

System.NotSupportedException: Specified method is not supported

和自甴很熟 提交于 2020-01-03 13:11:04
问题 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?

Do MembershipProviders in ASP.net MVC affect stylesheet links?

纵饮孤独 提交于 2020-01-03 06:05:08
问题 I changed the MembershipProvider in my ASP.net MVC website, and now the stylesheet for the login page isn't referenced correctly. Below is a copy of the forms tag in my web.config if that could be the reason. It looks identical though to the one generated by a new project with the exception of the name and timeout attribute. <authentication mode="Forms"> <forms loginUrl="~/Account/Login" name=".ADAuthCookie" timeout="10" /> </authentication> When I visit the page now, the link tag for the CSS

Do MembershipProviders in ASP.net MVC affect stylesheet links?

有些话、适合烂在心里 提交于 2020-01-03 06:03:21
问题 I changed the MembershipProvider in my ASP.net MVC website, and now the stylesheet for the login page isn't referenced correctly. Below is a copy of the forms tag in my web.config if that could be the reason. It looks identical though to the one generated by a new project with the exception of the name and timeout attribute. <authentication mode="Forms"> <forms loginUrl="~/Account/Login" name=".ADAuthCookie" timeout="10" /> </authentication> When I visit the page now, the link tag for the CSS

Error when deleting user mvc 4 using SimpleMembership

偶尔善良 提交于 2020-01-02 05:36:29
问题 When I try Membership.DeleteUser(string, bool) in a MVC 4 project where I use SimpleMembership provider, I get following error message: "The DELETE statement conflicted with the REFERENCE constraint "fk_UserId". The conflict occurred in database "Conductor_Basic3", table "dbo.webpages_UsersInRoles", column 'UserId'. The statement has been terminated." The constraints is set and is correct, so I can't really understand the error message. I guess I've missed something here. Can anyone explain

.net MVC Simple Membership Authentication with Database

左心房为你撑大大i 提交于 2019-12-31 08:15:00
问题 Using Code First Entity Framework with .NET MVC 4 I have created a new Web Application and populated the database with object as shown below. public class GratifyGamingContext : DbContext { public DbSet<Game> Games { get; set; } public DbSet<Genre> Genres { get; set; } public DbSet<UserProfile> UserRepository { get; set; } } I want to use my UserRepository table instead of the inbuilt UserContext class from AccountModel.cs for my user account access since I can't get that the work with my

.net MVC Simple Membership Authentication with Database

我只是一个虾纸丫 提交于 2019-12-31 08:14:32
问题 Using Code First Entity Framework with .NET MVC 4 I have created a new Web Application and populated the database with object as shown below. public class GratifyGamingContext : DbContext { public DbSet<Game> Games { get; set; } public DbSet<Genre> Genres { get; set; } public DbSet<UserProfile> UserRepository { get; set; } } I want to use my UserRepository table instead of the inbuilt UserContext class from AccountModel.cs for my user account access since I can't get that the work with my

Unable to initialize provider. Missing or incorrect schema. for MySql.Web connector

一曲冷凌霜 提交于 2019-12-30 18:07:06
问题 Hey guys and gals running into a little issue here.. I'm trying to use MySql Connector 6.2.2.0 for membership and role providers.. The issue I'm having is: Unable to initialize provider. Missing or incorrect schema. <authentication mode="Forms"/> <roleManager defaultProvider="MySqlRoleProvider" enabled="true" cacheRolesInCookie="true" cookieName=".ASPROLES" cookieTimeout="30" cookiePath="/" cookieRequireSSL="false" cookieSlidingExpiration="true" cookieProtection="All" > <providers> <clear />

Implementing Custom Membership user and Custom Membership Provider

梦想的初衷 提交于 2019-12-30 07:10:57
问题 References http://msdn.microsoft.com/en-us/library/6tc47t75%28v=VS.80%29.aspx http://msdn.microsoft.com/en-us/library/ms366730.aspx Question In the 2nd link precisely under heading Create a Custom Membership Provider you will note that they mention this You will need to create a custom membership provider that supports both your custom membership user type, and your custom membership data store. The GetUser and CreateUser methods of the custom membership provider can be written to return

The RPC server is unavailable while creating user in Active Directory

半世苍凉 提交于 2019-12-25 05:34:12
问题 I am trying to get my asp.NET application to register new users in Active Directory. using the default Active Directory Membership Provider in asp (.NET 4.5) While logging in works just fine, I get the following error when trying to create a new user: The RPC server is unavailable. (Exception from HRESULT: 0x800706BA) http://i.imgur.com/PjjBxkJ.png (I know this should be an image, but I can't embed those yet) This happens as soon as I submit the form. Though it also happens with the Create

Going from dev to prod with .net Membership Provider

六眼飞鱼酱① 提交于 2019-12-24 17:52:28
问题 I use SQLExpress on my dev machine. I just posted my application to a new prod server with SQL Server installed on it... I have restored my SQL DB in prod and i am successfully connecting to the DB with my connection string. However, the membership provider seems to be failing to find my users in the DB. Am i missing a step to configure or "activate" the membership provide on the prod server? Any help would be great. Thank you. 回答1: I have a strong feeling it has to do with the