IHttpModule and User.IsInRole

  • Thread starter Thread starter trullock
  • Start date Start date
T

trullock

Hi,

Ive written a URLRewriter IHttpModule which all works fine.
I've come to make a change to it which involves deciding where to
redirect based on what role a user is in.
HttpContext.Current.User is null however in my ihttpmodule's
beginrequest event :(
Should it be? If so, is there a different event i can use where the
User does exist which doesnt fire too late to perfrom the rewrite?

Thanks

Andrew
 
Hi,

Ive written a URLRewriter IHttpModule which all works fine.
I've come to make a change to it which involves deciding where to
redirect based on what role a user is in.
HttpContext.Current.User is null however in my ihttpmodule's
beginrequest event :(
Should it be? If so, is there a different event i can use where the
User does exist which doesnt fire too late to perfrom the rewrite?

Thanks

Andrew

AuthenticateRequest
 
AuthenticateRequest

Hi,

Thanks for that suggestion, ive tried it and the user does exist at
that point, but .IsInRole("bla") always returns false, for all the
roles its supposed to be in :s

Any idea whats going on there?

Thanks

Andrew
 
Hi,

Thanks for that suggestion, ive tried it and the user does exist at
that point, but .IsInRole("bla") always returns false, for all the
roles its supposed to be in :s

Any idea whats going on there?

Thanks

Andrew

OK i've used AuthorizeRequest :)

Is that still and acceptable event in which to perfrom the rewrite?

Thanks

Andrew
 
Back
Top