asp.net-membership

MVC 1 and IIS 7 error code 4011

折月煮酒 提交于 2020-01-24 08:21:06
问题 I've got an MVC 1 application running on IIS 7.5. After some operations are complete, I've got a RedirectToRoute call using System.Web.Routing.RouteValueDictionary as the second parameter. Basically it calls for "Details" of the particular object by ID. When this code is encountered on my production server running IIS 7.5, it takes me back to the login page and has a ReturnUrl value in the URL at the top. Once I log in again, it takes me to the page that it was supposed to take me directly to

How to Implement ASP.Net Membership in MVC Project?

回眸只為那壹抹淺笑 提交于 2020-01-21 05:05:24
问题 I am new in ASP.NET Membership. And I want to implement ASP.NET Membership in ASP.NET MVC project. I am not sure is it possible or not. Whenever we going to create MVC application at that time we found option for change authentication(no authentication, identity authentication, organization etc.). I've select identity authentication and get those tables in my application. look attached. But I don't want ASP.NET Identity table and functionality. I want ASP.NET Membership table and

How can i implement a role-hierarchy in an asp.net mvc app using activedirectorymembershipprovider

孤街醉人 提交于 2020-01-21 00:15:36
问题 In my asp.net mvc app i am using the activedirectorymembershipprovider. In the active directory i have created a couple of roles (groups) similar to, for simplicity of this example, "normal" and "administrator". I am currently querying whether user is in role by getting the IPrincipal of the httpcontext and calling User.IsInRole(nameOfRoleGoesHere);. The behaviour im looking for is for me to be able to ask whether user is in role "administrator" and then implicitly be asking whether user is

Implement custom “ValidateUser” in MembershipProvider

送分小仙女□ 提交于 2020-01-16 05:11:46
问题 I am implementing a custom MembershipProvider and I am trying to get the ValidateUser method to validate against my Profiles table in SQL Server. This table has columns called UserName and Password . public override bool ValidateUser(string username, string password) { ??? what to do here??? } FYI, I am using MVC3 & EF 4.1 Code First. Thanks Paul 回答1: If you're using EF 4.1, you will have some kind of a DbContext object that contains the DbSet for your Profiles table - right? So in that case,

Why should underlying membership provider decide whether…?

社会主义新天地 提交于 2020-01-15 08:18:12
问题 A) Why, when using templates with CreateUserWizard control, does including Textbox with ID=Email depend on whether CreateUserWizard.RequireEmail property is set to true, but TextBox with ID=Question is required only if underlying membership provider requires password question? In other words, why wouldn’t it also be up to underlying membership provider to decide whether Textbox ( with ID=email ) is required? B) On the other hand, why would be up to membership provider to decide whether

Why does httpRuntime targetFramework=“4.5” disable grabbing the .ASPXAUTH cookie?

你离开我真会死。 提交于 2020-01-13 11:13:33
问题 When my web.config has the below httpRuntime, my controller cannot grab the cookie .ASPXAUTH. It seems to be able to grab any other cookie, with or without the period prefix. If I delete the below line, it works fine. <httpRuntime targetFramework="4.5"/> I'm using the following to grab the cookie. HttpCookie authCookie = Request.Cookies[".ASPXAUTH"]; Why can't I grab the Forms Authentication cookie? 回答1: I had similar problem - my app with runtime 4.5 was unable to read an .ASPXAUTH cookie

asp.net 'Remember me' not working anymore with forms authentication

雨燕双飞 提交于 2020-01-12 02:28:51
问题 I have two websites with self written membership providers that are hostet on the same server in the same Web in different web-applications and different application pools. Formerly I had the problem, that I could not log on on both sites together. Thanks to Remy's post, this works now, I had to add the name -attribute to the forms element. But now I have the problem that the remember-me option of the asp login-control stopped to work. The user is logged off after the normal session-timeout.

Can anonymous and authenticated profiles coexist together in ASP.NET?

自闭症网瘾萝莉.ら 提交于 2020-01-11 12:23:38
问题 I'm trying to figure out exactly when the event Profile_MigrateAnonymous fires. My best guess from just tracing through my code is that it fires when it detects BOTH an anonymous membership cookie AND an authenticated membership cookie. Can anyone confirm this? I'm looking for real in depth answer here. Not just it gets called 'when a user logs in'. Now - why do I care? I was trying to keep the anonymous profile hanging around after a user had authenticated so that once they log out I'd still

Can anonymous and authenticated profiles coexist together in ASP.NET?

守給你的承諾、 提交于 2020-01-11 12:22:31
问题 I'm trying to figure out exactly when the event Profile_MigrateAnonymous fires. My best guess from just tracing through my code is that it fires when it detects BOTH an anonymous membership cookie AND an authenticated membership cookie. Can anyone confirm this? I'm looking for real in depth answer here. Not just it gets called 'when a user logs in'. Now - why do I care? I was trying to keep the anonymous profile hanging around after a user had authenticated so that once they log out I'd still

ASP.NET Login/Membership - How to logout?

余生长醉 提交于 2020-01-10 20:06:09
问题 I am using the <asp:LoginStatus> control (along with <asp:Login> ) I login successfully as A . Then I logout. If I then login as B , the current user is still A . (Both <asp:LoginName> and HttpContext.Current.User.Identity.Name are showing A ) I have to clear the cookies to completely logout. Why doesn't the .NET login control log me out properly? Anyone has any idea? EDIT : I apologize everyone! This is an Umbraco bug . I forgot I was using UmbracoMembershipProvider 回答1: On logout to