Connecting Tech Pros Worldwide Forums | Help | Site Map

IHttpModule and User.IsInRole

trullock@hotmail.com
Guest
 
Posts: n/a
#1: Mar 31 '07
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


Alexey Smirnov
Guest
 
Posts: n/a
#2: Mar 31 '07

re: IHttpModule and User.IsInRole


On Mar 31, 1:50 pm, trull...@hotmail.com wrote:
Quote:
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

trullock@hotmail.com
Guest
 
Posts: n/a
#3: Apr 4 '07

re: IHttpModule and User.IsInRole


On 31 Mar, 15:14, "Alexey Smirnov" <alexey.smir...@gmail.comwrote:
Quote:
On Mar 31, 1:50 pm, trull...@hotmail.com wrote:
>
Quote:
Hi,
>
Quote:
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?
>
Quote:
Thanks
>
Quote:
Andrew
>
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

trullock@hotmail.com
Guest
 
Posts: n/a
#4: Apr 4 '07

re: IHttpModule and User.IsInRole


On 4 Apr, 11:45, trull...@hotmail.com wrote:
Quote:
On 31 Mar, 15:14, "Alexey Smirnov" <alexey.smir...@gmail.comwrote:
>
>
>
Quote:
On Mar 31, 1:50 pm, trull...@hotmail.com wrote:
>
Quote:
Quote:
Hi,
>
Quote:
Quote:
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?
>
Quote:
Quote:
Thanks
>
Quote:
Quote:
Andrew
>
Quote:
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
OK i've used AuthorizeRequest :)

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

Thanks

Andrew

Closed Thread