1.0 - cleanResourceUrl won't work in IIS 7.0 unless handler/module entries exist under system.web

  1. #1

    1.0 - cleanResourceUrl won't work in IIS 7.0 unless handler/module entries exist under system.web

    If you're running IIS 7.0 and only put the handler/module entries for the ext.axd resource handler under the system.webServer section (which is standard practice), the resource URLs that are emitted by Ext.NET will always default to using WebResource.axd instead of the cleaner version referencing ext.axd. This is because the HasHandler method under Ext.Net.ResourceHandler looks explicitly for the httpHandlers node (specific to IIS 6.0 and earlier) instead of that OR the handlers node (specific to IIS 7.0):

    bool result = false;
    string path = Path.Combine(HttpContext.Current.Request.PhysicalApplicationPath, "web.config");
    XmlTextReader reader = new XmlTextReader(new StreamReader(path));
    
    try
    {
        if (reader.ReadToFollowing("httpHandlers"))
        {
            if (reader.ReadInnerXml().Contains("type=\"Ext.Net.ResourceHandler\""))
            {
                result = true;
            }
        }
    }
    This necessitates adding both handler/module declarations to the web.config in order to use cleanResourceUrl when running IIS 7.0.
  2. #2
    Hi Luke Stratman,

    Good find. Thanks for pointing out this defect.

    There is something related to this that I've wanted to change for a while now, so I'll investigate this defect at the same time.
    Geoffrey McGill
    Founder

Similar Threads

  1. Replies: 4
    Last Post: Feb 01, 2011, 11:54 AM
  2. Replies: 6
    Last Post: May 07, 2010, 12:11 PM
  3. click handler doesn't work
    By Kamal in forum 1.x Help
    Replies: 2
    Last Post: Nov 17, 2009, 10:02 AM
  4. Replies: 2
    Last Post: Aug 31, 2009, 6:03 PM
  5. AjaxEvent handler in VB does not seem to work
    By dbassett74 in forum Bugs
    Replies: 1
    Last Post: Apr 21, 2009, 11:03 AM

Posting Permissions