membership-provider

RoleProvider .NET 2 - converted from MS Access to MySQL

家住魔仙堡 提交于 2019-12-12 02:39:32
问题 I have an old site running on .NET 2 using an AccessMembershipProvide and I'm changing it to MySqlMemebrshipProvider - The membership side works fine, but the roles part seems to not provide the roles methods? If I switch back to the OdbcRoleProvide in the Web.Config it works while still using the MySqlMembershipProvider. I'm calling the roles with: Response.Write(Roles.IsUserInRole(User.Identity.Name, "Admin") & " -role exist- " & Roles.RoleExists("Admin")) this returns false even with

Set active membership provider programmatically

↘锁芯ラ 提交于 2019-12-12 01:56:31
问题 I have a web application with custom membership providers. The provider I want to use connects to a Progress database. I have one page that uses a competely different membership provider. I've tried setting this via the web.config but cannot get it working. So I was wondering if I could set the membership provider programmatically for this page. I see here that it is possible on some level though this looks pretty hacky. I was hoping there'd be a clean way of doing this one way or another.

Set Membership Provider to use a specific Provider

梦想的初衷 提交于 2019-12-12 01:35:26
问题 I'm using the out of the box Asp.Net Membership functionality to handle my user management and role management. My application consists of a single database for each client and each database has its own Membership provider and role provider. However, there are some users who work for more than one of the clients and I want to be use a single login and let them choose which client to view. I have everything setup to facilitate this "client switching" by using an intermediate database that

ASP.NET web forms - how to combine WIF authentification with membership provider and role provider

放肆的年华 提交于 2019-12-12 01:08:29
问题 I'm using windows identity foundation with form authentification in ASP.NET Web Forms in .NET 4.5 How can I combine WIF form authentification with my custom membership provider and my custom role provider defined in web.config? I want to use my custom membership provider for load additional user info from SQL DB such as email, birthday, avatar iamge. I want to use my custom role provider to obtain all roles from SQL DB for authentificated user. My authentification method Authenticate(userName

Move my Code First Entity Framework created database to the Default Membership Provider database

筅森魡賤 提交于 2019-12-11 20:05:16
问题 I have an ASP.NET MVC3 application that I have built and it has two databases. One is in reference to the Default Membership Provider and was automatically created when I built the app. The other is a database I have named SchoolContext and I would like all the information within SchoolContext to be stored in the same database as all the data in Default Membership Provider. Here are my two connection strings: <add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS

The user name or password provided is incorrect. in MVC 3 Internet Application

不问归期 提交于 2019-12-11 18:51:17
问题 I have a " Internet Application " - " A default ASP.NET MVC 3 project with an account controller that uses forms authentication. " called MyMv3App . I run the site in IIS Express using Ctrl + F5 and then I go to localhost:10382/Account/Register and I create a user " test1 ". Once the user is created I'm redirected to the Home page. I log off. Then I go to localhost:10382/Account/LogOn and type the username and password for the user "test1" and click on "Log On" button and the user is logged

In an ASP.NET WebForms and MVC integrated app, the session time outs earlier on MVC views but not on WebForms

北战南征 提交于 2019-12-11 18:16:00
问题 I have integrated an ASP.NET MVC 4 app with a legacy ASP.NET 4 Webforms app. The webforms app used SQL Membership Provider to implement the security features with Forms authentication mode , so I've kept that security in the newly integrated app as well. I am using [authorize] attribute on some MVC action methods to protect some MVC views. This all works fine except that the MVC pages (Views) timeout earlier than the timeouts set for forms authentication and the sessionState as shown below in

ASP.NET membership model for multiple Company accounts, each with multiple Users

我怕爱的太早我们不能终老 提交于 2019-12-11 11:48:45
问题 Tyring to design a membership system for multiple company accounts, each with multiple users (as opposed to just unique users ala default ASP.NET Membership provider). Seems like a very common scenario, but can find NO guidance. How is this usually implemented? ARGH!! Company Account A [CompanyID]; User 1 [UserID]; User 2 [UserID];... Company Account B [CompanyID]; User 3 [UserID]; User 4 [UserID];... Can I use ASP.NET 2.0 Membership Provider (as is or modified?), or do I need to roll my own

Create Custom Memebership Provider in MVC 4 Always get error

别来无恙 提交于 2019-12-11 10:08:40
问题 I tried to develop custom membership provider in order to use with my own database tables but I couldn't. After run project I saw red error line on web.config custom membership provider line. :( type="Mvc4ApplicationTest2.Models.CustomMembershipProvider" I found article that said me to add below lines to web.config and I did. add key="enableSimpleMembership" value="false" add key="autoFormsAuthentication" value="false" Now application run :) but after get to login page and clicked on submit i

Why might Membership.ValidateUser return false when the user is approved and is not locked out?

走远了吗. 提交于 2019-12-11 07:15:16
问题 I know this looks similar to other questions here but I don't think my case is the same as theirs. I have a website that uses the AspNetSqlMembershipProvider to validate users. I would like to use the same database from a console application. According to several articles on the web I can use the System.Web.Security.Membership class from outside ASP.NET by copying the appropriate sections from web.config to app.config. That is what I did. My console appliction can get the user with the