Strange problem ScriptResource.axd

V

Victor

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...d_and_and_assemblies_built_in_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
Victor
 
S

Steven Cheng[MSFT]

Hi 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/subscriptions/managednewsgroups/default.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/subscriptions/support/default.aspx.

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


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




--------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,479
Members
44,900
Latest member
Nell636132

Latest Threads

Top