Hi Peter,
the problem is that you are getting a new User (whitout IIdentity data) and setting it to the Context.User.
You have to set the IIdentity first (from ASP.NET authentication)
current.Identity = HttpContext.Current.User.Identity;
a then:
Context.User = current;
HTH,
Jordi
On 8/4/06, Peter Berkenbosch <[EMAIL PROTECTED]> wrote:
Something went wrong, so here is it again :
public void OnAuthenticateRequest(object sender, EventArgs e)
{
HttpCookie cookie = Request.Cookies.Get(FormsAuthentication.FormsCookieName );
if (cookie == null)
return;
int id = GetUserId(cookie);
Models.User current = Models.User.TryFind(id);
if (current == null)
{
//This means that we've a cookie for a user that has been removed, we'll
//remove the cookie and redirect to the default page, if the user will
//try to log in again, they will get the usual message, and then it is
//the IT problem.
RemoveAuthCookieAndRedirectToDefaultPage();
}
Context.User = current;
}
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net 's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
CastleProject-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/castleproject-users
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ CastleProject-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/castleproject-users
