.NET의 멤버 자격 및 역할과 함께 제공되는 프로필을 사용하는 방법을 배우고 있습니다.익명 프로필을 검색하는 방법
//Q1. Does it mean I set auth manually when loading user, or create it if not already exists?
//Or am I meant to get the isauth value from somewhere and pass it in?
var currentUserProfile = ProfileBase.Create(Membership.GetUser().UserName, isauth);
var anyUserProfile = ProfileBase.Create(strNewUser, isauth);
//isauth: true to indicate the user is authenticated;
// false to indicate the user is anonymous.
그리고 값을 얻을 :
//Q2. Are res1 and res2 below reflecting the same thing?
//Gets a value that indicates whether the user has been authenticated
bool res1 = HttpContext.Current.User.Identity.IsAuthenticated;
//Gets a value indicating whether the user profile is for an anonymous user
bool res2 = HttpContext.Current.Profile.IsAnonymous;
나는 각 익명/인증의 관계에 대한 혼란 스러워요을 값을 설정하는 체인의 상단입니다 그러나, 나는 확실하지 않다 그들의. 어느 것이 사용자를 인증 또는 익명으로 설정/설정하는 올바른 방법입니까? 내 목표는 익명 사용자와 인증 된 사용자가 프로필을 가질 수있게하는 것입니다.
IIS6 se ttings, 아닌가요? 매우 가능성이있는 @Tom은 II7을 사용합니다. – abatishchev
님이 2 개의 사진을 더 보았습니다. –