I'm trying to work out why when perform a javascript AJAX call to to a Controller GET method my registered IHttpModule does not fire its events, in particular the EndRequest method. This event fires correctly when there is a standard GET request to the page the first time but not when I do this via a JQuery AJAX call.
Can anyone offer any insights here?
My javascript looks like follows:
$.ajax({
type: 'GET',
dataType: "json",
url: /controller/action,
success: function (data) {
//do stuff
}
},
error: function () {
}
});
And my controller inherits from System.Web.Mvc.Controller.
In my config I have registered the module like so:
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" >
<add name="MyWebModule" type="MyWebModule"/>
</modules>
....
<httpModules>
<add name="MyWebModule" type="MyWebModule"/>
</httpModules>
<system.web>