This forum has been moved here:
Helicon Tech Community Forum

ISAPI_Rewrite 3.0 (Forum Locked Forum Locked)
 Helicon Tech : ISAPI_Rewrite 3.0
Subject Topic: ISAPI_RW3 Lite on IIS 7.x Integrated mode
Author
Message |
scmember
Newbie


Joined: 18 October 2011
Location: United States
Posts: 3
Posted: 18 October 2011 at 1:24pm

Hi there,

I'm trying to use ISAPI_Rewrite3_x64_Lite on IIS 7.5 that
runs Sitecore CMS app in integrated pipeline mode.

The issue seems to be related that Sitecore HttpModule
gets called before ISAPI_Rewrite one even though the
ISAPI Filters indicate that Helicon module stays first in
the list. Below is the ordered list of ISAPI Filters on
my site in IIS 7.5:
ISAPI_Rewrite_x64
ISAPI_Rewrite_32
ASP.Net_2.0.50727-64
ASP.Net_2.0.50727.0
ASP.Net_2.0_for_V1.1
ASP.Net_4.0_64bit
ASP.Net_4.0_32bit

Do you have any idea why should any HttpModule defined in
the web.config file be called before Helicon
ISAPI_Rewrite one in such configuration?

It's worth to mention that if I set
NotificationType=PREPROC_HEADERS setting, everything
starts working fine. Though I don't see why this would be
required if ISAPI_Rewrite module is set to be executed
first.

I found several posts on this forum where people had no
issues using ISAPI_Rewrite3 with Sitecore and several
posts where people ran into some problems.
I assume for those who run full version of
ISAPI_Rewrite3, the problem does not exist. It could be
related to Helicon Proxy that gets installed along with
full version of the module (though it's just assumption).

Thanks,
--Ivan
Back to Top
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 19 October 2011 at 7:23am

Hello Ivan,

The order of ISAPI_filters is important, but there're also the stages of request processing. ISAPI_Rewrite is not the first one to catch the request. It
shows up after authorization. So, basically, NotificationType=PREPROC_HEADERS changes that order and makes ISAPI_Rewrite take part at earlier stage.

It doesn't matter if it is full or trial version.

Regards
Andrew
Back to Top
 
scmember
Newbie


Joined: 18 October 2011
Location: United States
Posts: 3
Posted: 19 October 2011 at 5:33pm

Thanks Andrew!
Do you know at what stage IIS 7 calls to custom managed
modules defined in ASP.NET app?
If Authorization module gets called first and
ISAP_Rewrite gets invoked after that, it does not quite
explain why my URL comes already changed to ISAPI_Rewrite
module. Unless Managed Engine starts ASP.NET runtime
somewhere in between.
Do you happen to know when ASP.NET runtime starts in
Integrated mode and when it calls to modules defined at
the <modules> section of the app?

Thanks for your help!

Edited by scmember - 19 October 2011 at 5:33pm
Back to Top
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 21 October 2011 at 4:37am

In integrated mode the events for native module, isapi and .net are called mixed together

e.g. if it's a BeginRequest then the native module is the first to come, then isapi, then .net code. After that everything will repeat for AuthenticateRequest...

Some time ago it used to be like this: isapi has processed all events, and only after that .net was invoked. This is probably what you've assumed.

Take a look at the following order:
http://msdn.microsoft.com/en-us/library/aa347580(v=VS.90).aspx

BeginRequest
(None)

AuthenticateRequest
PostAuthenticateRequest

AuthorizeRequest
PostAuthorizeRequest

ResolveRequestCache
PostResolveRequestCache

MapRequestHandler
PostMapRequestHandler

AcquireRequestState
PostAcquireRequestState

PreRequestHandlerExecute
(None)

RequestHandlerExecute
PostRequestHandlerExecute

ReleaseRequestState
PostReleaseRequestState

UpdateRequestCache
PostUpdateRequestCache

LogRequest
PostLogRequest

EndRequest
(None)


Regards
Andrew
Back to Top
 
scmember
Newbie


Joined: 18 October 2011
Location: United States
Posts: 3
Posted: 21 October 2011 at 12:24pm

Thanks a bunch, Andrew!

This explains why I'm seeing this behavior.
I also found that Sitecore's HttpModule hooks up into
Authentication request, so that it definitely processes
incoming request first and then at some point ISAPI filter
kicks in.

Thanks again for you help!
Back to Top
 

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

Printable version Printable version