asp.net-membership

Looking for a .NET library to do authentication that support multiple sources [closed]

半城伤御伤魂 提交于 2019-12-12 19:06:51
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I'm looking for a suggestion for a .NET library which can allow me to use in an ASP.NET application so that I have one profile for each user, but can associate authentication from multiple sources including: ASP.NET Forms based, windows live id, google, facebook, openid, etc... I want people to come to my

How do you cancel someone's persistent cookie if their membership is no longer valid?

落爺英雄遲暮 提交于 2019-12-12 19:03:53
问题 I'm designing a small ASP.NET MVC site for a club. Generally, I want users to be able to stay logged in, but what happens if a user's membership has lapsed? Is there any way to "de-authorize" them so that next time they try to view a page, it redirects them to a page telling them their membership has lapsed? 回答1: If the timeout defined for the authentication cookie is hit it will no longer be valid and users will automatically be redirected to the login page. If you want to sign them out

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 Membership staying authenticated issues

隐身守侯 提交于 2019-12-12 14:19:43
问题 So, my application is being odd in the fact that when you login you will stay logged in for a page or two then get lost. My settings are this: <authentication mode="Forms"> <forms name=".ASPXFORMSAUTH" timeout="20"/> </authentication> <authorization> <allow users="*" /> </authorization> <membership defaultProvider="MySqlConnection" userIsOnlineTimeWindow="45"> <providers> <clear /> <add name="MySqlConnection" type="System.Web.Security.SqlMembershipProvider" connectionStringName=

Login Redirect Issue

梦想的初衷 提交于 2019-12-12 14:19:33
问题 I want to re-direct people logging in based on their role. When I use the code below, the roles are coming up empty when debugging - I suspect because they haven't been completely logged in yet? I may be tapping into the the wrong event, can someone point me in the right direction? <asp:Login ID="LoginUser" OnLoggedIn="Login1_LoggedIn" runat="server" DestinationPageUrl="~/Login.aspx" EnableViewState="false" RenderOuterTable="false"> <p> <asp:Button ID="LoginButton" CssClass="submitButton"

Update Membership property. Method not supported

时间秒杀一切 提交于 2019-12-12 13:29:01
问题 I've tried to research the exception I'm getting for a couple of hours now with no progress. I'm simply trying update a Membership profile using the following code: MembershipUser user = Membership.GetUser(username); user.IsApproved = false; Membership.UpdateUser(user); So the problem is with the last line in the above code sample. The server is throwing an exception stating that the specified method is not supported. I have no build errors and I believe I'm using the correct libraries. Any

Disable SQL Membership Provider (ASP.Net Forms Authentication)

孤街醉人 提交于 2019-12-12 13:18:37
问题 I have setup a trivial preview website for a client that needs basic password protection. I'm using Forms Authentication with the credentials specified in web.config . Everything works fine on my box (famous last words) However, when I deploy to a production website running Win2008, the authentication code attempts to open a SQL Server database (I have no reference to anything SQL in web.config ). How can I disable this behavior so that authentication is based on the credentials I have

Web.config editing for Membership Role Authorization

☆樱花仙子☆ 提交于 2019-12-12 09:54:45
问题 I want to user Role based security through the authorization section in the web.config file. Using Membership, my application will allow for new Roles to be created, and thus, the pages they can access need to be set dynamically. Can I programatically alter this section in the web.config to manage this? If so, how? 回答1: using System.Configuration; using System.Web.Configuration; Configuration config = WebConfigurationManager.OpenWebConfiguration(Request.ApplicationPath); AuthorizationSection

How do I get the ID of the current logged in user?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 09:41:33
问题 I'm working on a sample project built from the ASP.NET Web Application template (web forms, not MVC). After a user logs in, I want to grab the user's ID and store it in a session variable so I can pass it between pages. How do I get the user's ID from the ASP.NET membership provider? By user's ID, I'm referring to the GUID in the membership database. Is there a method to get the user's ID? I'm using the default database schema and have it deployed to my server. Thanks! 回答1: Try this:

MembershipProvider change connection string in code

久未见 提交于 2019-12-12 08:44:10
问题 I am trying to implement Asp.net Forms Authentication in my site. Usually, you provide the name of your DB connection string in your web.config. However, as our database setup is a little more complicated, I was looking for a way to manually provide the MembershipProvider the connection string in code. Thanks! 回答1: You don't have to use a connectionStringName for SqlMembershipProvider , instead you can supply the connection string directly. I.e. instead of: <membership defaultProvider=