with what type of channel do you have your App Pool configured?
If you use Classic Channeling then you must define your HttpModule in the web.config in the following way
<configuration>
<system.web>
<httpModules>
<add type="Proyecto.App.UI.CustomAuthenticationModule" name="CustomAuthenticationModule"/>
</httpModules>
</system.web>
</configuration>
If you use Integrated Channeling then you must define your HttpModule in the web.config as follows
<configuration>
<system.webServer>
<modules>
<add type="Proyecto.App.UI.CustomAuthenticationModule" name="CustomAuthenticationModule"/>
</modules>
</system.webServer>
</configuration>
I would also check if you have established in your web.config both the HttpHandler and the HttpModule for the AJAX configuration (check the version numbers you work with)
<configuration>
<system.web>
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
</httpHandlers>
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</httpModules>
</system.web>
</configuration>