[CLOSED] Resource handler error

  1. #1

    [CLOSED] Resource handler error

    Resource handler throws following exception:

     System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.Parameter name: utcDate
       at System.Web.HttpCachePolicy.UtcSetLastModified(DateTime utcDate)
       at System.Web.HttpCachePolicy.SetLastModified(DateTime date)
       at Ext.Net.ResourceHandler.SetResponseCache(HttpContext context)
       at Ext.Net.ResourceHandler.ProcessRequest(HttpContext context)
       at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
    when components are built in one time zone (like UTC+3) and deployment location is in a western time zone (like UTC-8)
    Last edited by geoffrey.mcgill; Oct 07, 2010 at 6:48 PM. Reason: please use [CODE] tags
  2. #2

    RE: [CLOSED] Resource handler error

    There is no 'utcDate' parameter is the toolkit.

    Geoffrey McGill
    Founder
  3. #3

    RE: [CLOSED] Resource handler error

    But there is one in HttpCachePolicy.SetLastModified
  4. #4

    RE: [CLOSED] Resource handler error

    Resourcehandler.cs

    private void SetResponseCache(HttpContext context){
          HttpCachePolicy cache = context.Response.Cache;
    
    cache.SetLastModified(new DateTime(ResourceHandler.GetAssemblyTime(typeof(ResourceHandler).Assembly)));
    .........

    Last modified time is read from assembly file that is due to time zone differences is modified in future
    Last edited by geoffrey.mcgill; Oct 07, 2010 at 6:48 PM. Reason: please use [CODE] tags
  5. #5

    RE: [CLOSED] Resource handler error

    ok, I added a call to .ToUniversalTime() on the SetLastModified DateTime value.

    Fix has been committed to SVN.


    Geoffrey McGill
    Founder
  6. #6

    RE: [CLOSED] Resource handler error

    I looked up the source for the private System.Web.HttpCachePolicy.UtcSetLastModified() method, and I see where the ArgumentOutOfRange Exception is being thrown.

    The fix I just committed should solve the problem.


    Please confirm when you get a chance.


    Geoffrey McGill
    Founder
  7. #7

    RE: [CLOSED] Resource handler error

    Yes, Geoffrey, your fix solved the issue

    Thanks!

Similar Threads

  1. Resource Handler / Ext.NET initialization
    By Justin_Wignall in forum 1.x Help
    Replies: 0
    Last Post: Jul 27, 2012, 8:30 AM
  2. [CLOSED] Strange Resource Error
    By adelaney in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 21, 2012, 8:54 PM
  3. [CLOSED] Slate Theme - Invalid web resource request error
    By vali1993 in forum 1.x Legacy Premium Help
    Replies: 13
    Last Post: Oct 20, 2011, 11:30 AM
  4. Replies: 4
    Last Post: Sep 22, 2010, 7:43 AM
  5. Replies: 4
    Last Post: Feb 03, 2009, 9:52 AM

Posting Permissions