473,386 Members | 1,883 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

IHttpModule and User.IsInRole

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

Mar 31 '07 #1
3 1817
On Mar 31, 1:50 pm, trull...@hotmail.com wrote:
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

Mar 31 '07 #2
On 31 Mar, 15:14, "Alexey Smirnov" <alexey.smir...@gmail.comwrote:
On Mar 31, 1:50 pm, trull...@hotmail.com wrote:
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
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

Apr 4 '07 #3
On 4 Apr, 11:45, trull...@hotmail.com wrote:
On 31 Mar, 15:14, "Alexey Smirnov" <alexey.smir...@gmail.comwrote:
On Mar 31, 1:50 pm, trull...@hotmail.com wrote:
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

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

Apr 4 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Sameh Ahmed | last post by:
Hello there Is there a way through dotNet to check if a certain user is a member of a specific group? I use ADSI to get the memberships of the user then compare them to the group I want to check,...
8
by: Oliver Rainer | last post by:
Hi, I have the following problem... Pre-requisites: Installation of an Asp.net webservice on a IIS5 server (win2k). Anonymous access is not allowed, only using windows authentication (intranet...
3
by: =?Utf-8?B?Q2hhcmxlc0E=?= | last post by:
hi folks, I've got XP pro service pack 2 VS 2005 TSE with ASP.net 2.0 and C# I'm doing an example from Stephen Walther's so far excellent book and he has a whole load of stuff to add the...
0
by: ronscottlangham | last post by:
I have a web page that any authenticated user can access, but I dynamically enable/disable other asp.net controls on the web page based on the Role that they are in via C# code behind. My web...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.