Asp.net http modules are invoked twice, when used with RouteTable for user friendly url on REST
<p>I created a wcfrestservice, and added routing code in the global.ascx.cs. The routing works fine, But i use custom http module to log user's request, this module is getting invoked twice, Is there a way to prevent this. This started happening only if use the friendly url, if access the direct ulr(physical file), It is invoked only once.</p>

<p>Code in my Global.ascx.cs
    RouteTable.Routes.Add(new ServiceRoute("", new WebServiceHostFactory(), typeof (MyService)));</p>

<p>here is the sample config</p>

<pre><code>&lt;modules runAllManagedModulesForAllRequests="true"&gt;
&lt;remove name="UrlRoutingModule"/&gt;
&lt;add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" preCondition=""/&gt;
&lt;add name="custommodule" type="Test1.Test.CustomModule, Test1.Test" preCondition="managedHandler"/&gt;
</code></pre>

<p>If i try to change  runAllManagedModulesForAllRequests to false i get invalid method(405)</p>
