2
votes

I have added Web API into Web Forms application.

<system.webServer>
  <modules>
    <remove name="UrlRoutingModule-4.0"/>
    <add name="UrlRoutingModule-4.0" type="System.Web.Routing.UrlRoutingModule" preCondition=""/>
  </modules>

I have some code in Global.asax.vb:

Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs)
    ' Fires at the beginning of each request
End Sub

I don't want to create a separate module for it. This code works fine in IIS 7.5 (Windows 7) when I make requests to Web API. However, the event does not fire in IIS 7.0 (Windows Server 2008).

IIS 7 modules: IIS 7 modules

I found that everything is good with runAllManagedModulesForAllRequests="true":

<system.webServer>
  <modules runAllManagedModulesForAllRequests="true">
    <remove name="UrlRoutingModule-4.0"/>
    <add name="UrlRoutingModule-4.0" type="System.Web.Routing.UrlRoutingModule" preCondition=""/>
  </modules>

However, I want to get rid of this parameter by explicitly setting preCondition="" for the specific HTTP module.

I don't know what module needs to be added. How to find it?

1

1 Answers

1
votes

Solved the issue by installing KB980368 hotfix.

My server has all actual Windows updates installed. I didn't think that the hotfix is required for me.