Dec 02, 2010, 8:27 PM
DirectRequestModule detection issues
Hey all,
I've been having trouble getting ext.net to detect that I have the DirectRequestModule installed in my web.config properly. It looks like the piece of code in the ext.net framework that renders out the client warning is:
This is very confusing code since there also is a HasModule function in the ResourceHandler.cs that seems to not be called anywhere and actually reads whether the module is in the web.config or not. Why does this code write out the warning when I have the module setup properly? It seems really strange to me that moving it to the head makes it work with no warning... is this a bug?
My web.config is very straight forward, like this:
Running the latest version, 1.0RC1, VS2008, IIS 5.1, XP SP3.
I've been having trouble getting ext.net to detect that I have the DirectRequestModule installed in my web.config properly. It looks like the piece of code in the ext.net framework that renders out the client warning is:
ResourceManager.cs - line 802
if (this.scriptBuilder.Length > 0 || this.scriptFilesBuilder.Length > 0 || this.styleBuilder.Length > 0)
{
writer.Write(ResourceManager.WarningTemplate);
}
It works fine if I put my ResourceManager in the head, but in the body it always gives me the warning. It looks like Lifecycle.cs runs BaseRenderAction and then RenderAction right after one another which causes this behavior since the on the second call it writes the warning when it detects that BaseRender already wrote it out. I don't understand how the second writing implies that the request module isn't present...This is very confusing code since there also is a HasModule function in the ResourceHandler.cs that seems to not be called anywhere and actually reads whether the module is in the web.config or not. Why does this code write out the warning when I have the module setup properly? It seems really strange to me that moving it to the head makes it work with no warning... is this a bug?
My web.config is very straight forward, like this:
<system.web>
<httpHandlers>
...
<add path="*/ext.axd" verb="*" type="Ext.Net.ResourceHandler" validate="false"/>
</httpHandlers>
<httpModules>
...
<add name="DirectRequestModule" type="Ext.Net.DirectRequestModule, Ext.Net"/>
</httpModules>
...
And a page with just a ResourceManager and a Panel to test.Running the latest version, 1.0RC1, VS2008, IIS 5.1, XP SP3.