Re: IHttpModule and User.IsInRole

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



On 4 Apr, 11:45, trull...@xxxxxxxxxxx wrote:
On 31 Mar, 15:14, "Alexey Smirnov" <alexey.smir...@xxxxxxxxx> wrote:



On Mar 31, 1:50 pm, trull...@xxxxxxxxxxx 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

.



Relevant Pages

  • Re: Parse .cfm files
    ... Jerry Stuckle wrote: ... You'll be much better off in the long run if you change the extension to ... A 301 redirect takes care of things quite nicely - and permanently. ... One would use rewrite to do that, ...
    (comp.lang.php)
  • Re: .htaccess style rewrite with php
    ... Now that I think of it, you can also rewrite ... files, or pdf files, or .doc files, etc. as that file type. ... do it is redirect to that file, which is not what I want. ... Perhaps what you want to do is read in the file from a protected location and print the header and then the file. ...
    (comp.lang.php)
  • Re: mod_rewrite, last (newbie question perhaps)
    ... "Stop the rewriting process here and don't apply any more rewrite rules." ... A browser redirect happens when flag R is set. ... applying pattern 'a.php' to uri 'a.php' ...
    (comp.infosystems.www.servers.unix)
  • Re: Mod rewrite
    ... of redirects into .htaccess, but now I would like to... ... I'm starting a *massive* rewrite of one of my websites, ... if "http://website.com/file.htm"; doesn't exist, redirect to ...
    (uk.net.web.authoring)