asp.net-membership

ASP.NET access controls

时光怂恿深爱的人放手 提交于 2019-12-11 18:32:40
问题 I am trying to build an ASP.NET 3.5 website that allows users to log in and browse a couple of pages. I would like to restrict certain users to be able to view certain pages but I'm having trouble coming up with a custom and flexible system. I have seen MS's version of this but it's not what I am looking for. Can anyone direct me to some good online articles or even a video tutorial so I can do further research. Thanks! P.S. I have tried creating a class that inherits from System.Web.UI.Page

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

How do I use ASP.NET Membership Provider with Oracle?

做~自己de王妃 提交于 2019-12-11 18:09:17
问题 I am developing an ASP.NET Application in .NET 3.5 with a back end of Oracle 11g. All the examples that I am finding need Oracle.Web.dll What install has this file and is there an example somewhere for .NET 3.5? Thanks, Greg 来源: https://stackoverflow.com/questions/10643456/how-do-i-use-asp-net-membership-provider-with-oracle

.Net Identity 3 on existing solution

南笙酒味 提交于 2019-12-11 17:43:49
问题 I believe that .NET Identity 3 cannot run on an existing (v4.5) ASP.NET solution, but requires .NET Core. I cannot update to .NET Core. Is there a workaround for this? If not then how are people supposed to migrate from ASP.NET Membership to ASP.Net Identity? 回答1: First of all, I need to note that ASP.NET Core (which works with Identity 3) does not require .NET Core. It can be used either over .NET Core or .NET Framework 4.6.1 (or higher). I guess you use the default approach in both cases

how can I force a certain user to log in again asp.net identity

蓝咒 提交于 2019-12-11 17:10:04
问题 I have a console job running where it will turn the islockedout column to 1 in the [ASPNETDB].[dbo].[aspnet_membership] table if a user hasn't logged in to the system for 45 days or more. So when isLockedOut column is set to 1, the user won't be able to log in after that. But the problem I have is that when the user originally logged in if they ahd checked the remember me box this allows them to pass the log in page even if islockedout column is set to 1. Is there a way I can prevent them

AD Provider Membership.GetUser() cause error saying: “The parameter 'username' must not be empty.”

南楼画角 提交于 2019-12-11 16:13:25
问题 Using the ActiveDirectory Provider, when I execute Membershhip.GetUser() i get an error message: The parameter 'username' must not be empty. Here is the membership configuration: <membership defaultProvider="AspNetActiveDirectoryMembershipProvider" > <providers> <clear/> <add name="AspNetActiveDirectoryMembershipProvider" type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName=

ASP.NET how to logout user all session when password is reset/change

纵饮孤独 提交于 2019-12-11 14:59:44
问题 As an Admin, I am able to reset password for all users. May I know how can I logout the particular users "all" sessions across all devices/PC when I reset his password? Example: 1) User1 logged in to PC1, PC2 and PC3. 2) Admin reset/change password for User1. 3) System logout session in PC1, PC2 and PC3. How can it be done in ASP.NET? Thanks. 回答1: It is possible , Facebook , G mail are done that , But it is not simple Use a flag in the database that checks users on Session_Start that

SqlMembershipProvider question

假如想象 提交于 2019-12-11 14:51:40
问题 When you create the Register Control for the SqlMembersipProvider nothing happens if they register and the username or email is in use. Is there a tutorial or override function that fixes this in asp.net 2.0 回答1: You may need to register an event handler for the LoginError event. See this article for lots of details: http://aspnet.4guysfromrolla.com/articles/120705-1.aspx 回答2: You most certainly should see a red error message indicating that the operation failed and why. If you do not see

How can I use existing ASP.NET Membership data in a new .Net Core project?

为君一笑 提交于 2019-12-11 14:05:55
问题 I am starting a new .Net Core Web application. And I want to use the authentication tables (aspnet_Users, aspnet_Membership etc) that already exist in our database. But I am not sure how to do it. Upon creating the project, I select "Individual User Accounts" option for authentication. Then I need to choose between "Store user accounts in-app" and "Connect to existing store in the cloud". It seems like none of them suits my need. 来源: https://stackoverflow.com/questions/56275103/how-can-i-use

Simple user/password protection in asp.net MVC

自闭症网瘾萝莉.ら 提交于 2019-12-11 13:59:48
问题 a very simple problem, maybe someone has a tip for a MVC Beginner like me. I want to Password protect an MVC Application - just on user / password is necessary - I did it via ASPNETDB and SqlMembershipProvider, but there should be hopefully an easier way - in webforms I did it via adding user / password to web.config. Do I really need to write my own XmlMembershipProvider to solve that problem? If yes, do you know a really simple existing XmlMembershipProvider that can do this for me? Many