I have an old isapi application that I am now replacing with a new .NET one.
I set <module runAllManagedModulesForAllRequests="true"> to route the request according to some rule, between the old isapi handler, and the new aspx page. I have the following code in my global aspx:
protected void Application_BeginRequest(object sender, EventArgs e)
{
if (Request.Path.EndsWith("oldisapi.dll",
StringComparison.InvariantCultureIgnoreCase))
{
if (UseDotNet)
Context.RewritePath("/scripts/newpage.aspx");
}
}
This works great, except when I receive an http POST request – the oldisapi.dll doesn’t receive the request parameters.
If I remove the runAllManagedModulesForAllRequests it receives the parameters, but the rerouting to the .NET aspx page doesn’t work.
Can anyone help?
After a lot of frustration I couldn’t solve it, but I was able to avoid it.
If I don’t access the parameters of the request, it will not steal them from the old isapi.
I only needed the cookies, so this worked out fine for me.