Tuesday, March 13, 2012

Strange problem ScriptResource.axd

Hi guys, I have a very strange problem with scriptmanager here. I want to
load a js (which is embed in the project) but everytime i try to load that,
it gives me error like
Specified argument was out of the range of valid values.
Parameter name: utcDate
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

I found some articles talking about this issue. like
(http://dotnetslackers.com/JavaScrip...the_future.aspx)

In this article it suggest that we should use WebResource.axd. But this is
really not an option for me now. Is there a way I can fix this without
change the build date to the past, and make this working?

Cheers
VictorHi Victor,

From your description, you encountered the dynamicc emited resource issue
when using the ASP.NET AJAX scriptResource.axd (instead of the built-in
ASP.NET webresource.axd), correct?

I've also inspected the web article you mentioned, and from the function
call stack, it did indicate that the AJAX runtime will use the current time
to validate the scirpt url also and if the assembly building time is a
later time, it will raise the error. I'm afraid the most proper solution
here is adjust the assembly's build date.

BTW, I suggest one thing here which you can still have a try:

ASP.NET will use the machine key to encrypt the webresource.axd url's
parameters(in querystring), and by default the machinekey is a randomly
generated one which may involve the current time. I'm not sure whether AJAX
scriptManager will also use this, but you can have a try to specify a fixed
machine key for project to see whether it helps. Here is the MSDN article
mentioned how to manually configure machine key:

#How To: Configure MachineKey in ASP.NET 2.0
http://msdn2.microsoft.com/en-us/library/ms998288.aspx
Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscript...ault.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscript...rt/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

-------

Quote:

Originally Posted by

>From: "Victor" <victor@.noemail.noemail>
>Subject: Strange problem ScriptResource.axd
>Date: Mon, 1 Oct 2007 21:15:08 +1300


Quote:

Originally Posted by

>
>Hi guys, I have a very strange problem with scriptmanager here. I want to
>load a js (which is embed in the project) but everytime i try to load that,
>it gives me error like
>Specified argument was out of the range of valid values.
>Parameter name: utcDate
>Description: An unhandled exception occurred during the execution of the
>current web request. Please review the stack trace for more information
>about the error and where it originated in the code.
>
>I found some articles talking about this issue. like
>(http://dotnetslackers.com/JavaScrip...e_axd_and_and_a


ssemblies_built_in_the_future.aspx)

Quote:

Originally Posted by

>
>In this article it suggest that we should use WebResource.axd. But this is
>really not an option for me now. Is there a way I can fix this without
>change the build date to the past, and make this working?
>
>Cheers
>Victor
>
>
>
>
>
>

0 comments:

Post a Comment