membership-provider

asp.net mvc custom membership provider - strict login cache to one application

邮差的信 提交于 2019-12-24 17:31:12
问题 I created custom membership provider for asp.net mvc applications and it all works fine except one thing: when logged in to my application, I am also logged in to all other asp.net mvc applications that I run using Visual Studio. I suppose this data is being pulled from cache because when I logout and try to login again in other application, I'm being rejected. In webconfig, I added applicationName in order to solve this but it didn't work: <membership defaultProvider="SAMembershipProvider"

ASP.NET see if member is online

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-24 03:29:51
问题 I'm developing a ASP.NET site in umbraco, and I need to see if a member with a given ID is online. How can I do that? So far, I've tried to get the member by so: Member m = new Member(myID); But how can I check, if the returned member is logged in or not? EDIT: I followed the link, and extracted the following code from it: var users = Membership.GetAllUsers(); foreach(MembershipUser user in users){ Response.Write(user.IsOnline.ToString() +"<br/>"); Response.Write(user.LastActivityDate

Custom RoleProvider Not Called

岁酱吖の 提交于 2019-12-23 17:30:28
问题 My application has custom Role and MembershipProviders. I've registered them in web.config, but when I try to do if(User.IsInRole("Blah")) , neither of my breakpoints in the RoleProvider's Initialize or IsUserInRole are hit. The membership provider works fine, so I guess there must be something I've missed from web.config. This is what I have: <system.web> ... <membership defaultProvider="MyAppMembershipProvider" userIsOnlineTimeWindow="15"> <providers> <clear /> <add name=

Difference between Membership Provider in ASP.NET Webforms and MVC 3

廉价感情. 提交于 2019-12-23 10:58:05
问题 Is there a difference in the working between the Membership Provider of Webforms and Membership Provider of MVC 3? 回答1: No. The membership provider is part of the System.Web.Security namespace Webforms is the System.Web.UI namespace MVC is the System.Web.Mvc namespace Therefore, there are no dependencies. In other words, you'll be making the same membership calls with the same membership objects in an MVC application as you would in a WebForms application. 回答2: No, MVC is just a design

Difference between Membership Provider in ASP.NET Webforms and MVC 3

不问归期 提交于 2019-12-23 10:57:11
问题 Is there a difference in the working between the Membership Provider of Webforms and Membership Provider of MVC 3? 回答1: No. The membership provider is part of the System.Web.Security namespace Webforms is the System.Web.UI namespace MVC is the System.Web.Mvc namespace Therefore, there are no dependencies. In other words, you'll be making the same membership calls with the same membership objects in an MVC application as you would in a WebForms application. 回答2: No, MVC is just a design

Disadvantages of building an Asp.net mvc 3 without using MembershipProvider

痴心易碎 提交于 2019-12-23 05:28:04
问题 Are there any fundamental drawbacks to not using the MembershipProvider for an asp.net mvc 3 application besides having to write everything yourself? I'm wondering if there is something bigger I'm missing that it makes much easier. Would the authorize attribute work on controllers? Thanks. 回答1: AuthorizeAttribute is in no way dependent on ASP.NET membership. It just looks at the HttpContext.User . Anything which sets that will work. The biggest drawback to "doing it yourself" is that most

How to make RavenDB DocumentStore available to calling APIs

◇◆丶佛笑我妖孽 提交于 2019-12-23 04:53:25
问题 I have an MVC4 application using RavenDB as a datastore. The application has MVC/Web, Domain, Data, and Security layers. I am writing custom membership and role providers that need to initialize the database and access the DocumentStore. I'm writing these class from the Security layer, and would like to use a singleton DocumentStore (set in the application), but I can't figure out how to access it. Other, examples I see of writing custom providers for RavenDB create new DocumentStore

How to get security question answer in .net sql membership provider?

ぃ、小莉子 提交于 2019-12-23 01:13:51
问题 Is there any way to get form code level security question answer in .net SQL Membership Provider? I'm struggling with allowing user to have change password reset and change features using the same provider. Do anybody knows how to do that? Or if I would like to use question and answer feature it means that I automatically have to use security question to change password? 回答1: MembershipProviders such as SqlMemberShipProvider aren't designed to allow you to retrieve the password answer, only

SqlMembershipProvider: use my own database as user store database

社会主义新天地 提交于 2019-12-22 10:44:43
问题 I'm developing an ASP.NET application with Visual Studio 2008 SP1 and C# . I'm also using Sql Server 2008 SP1 . I'm trying to add the tables created with the command aspnet_regsql -S (local) -E -A m to my own database. If I run that command it will create a database ( Aspnetdb database) with four tables. I want to know if there is a command that creates those tables in my own database (called myDatabase , for example). And, when the tables are created. How can I connect authentication to

How to avoid using membership provider?

冷暖自知 提交于 2019-12-22 04:36:13
问题 We are currently building architecture for thin-client bookkeeping application. It should follow two main requirements: Application should have module design. Each module can have (and they actually do have) own Role system. Later application should be adapted for running using different databases on different machines. We think Asp.NET MVC 3 is appropriate platform for this task. For managing application data we chosen latest version of Entity Framework - its batch of Data Providers and Code