Blogger Widgets
  • Sharing Photos using SignalR
  • TFS Extenstion - allows copy work items between projects
  • Displaying jquery progressbar with ajax call on a modal dialog
  • Managing windows services of a server via a website
  • Exploring technologies available to date. TechCipher is one place that any professional would like to visit, either to get an overview or to have better understanding.

Search This Blog

Monday 16 August 2010

Ajax Control Toolkit 3.5 : The script 'Timer.js' has been referenced multiple times.

Developed a website using Fast ASP.NET Web page loading by downloading multiple JavaScripts after visible content and in batch using .NET 2.0, Ajax 1.0 and Ajax Control toolkit. After migrated to .NET 3.5 getting the following error:-

"Microsoft JScript runtime error: Sys.InvalidOperationException: The script 'Timer.js' has been referenced multiple times. If referencing Microsoft AJAX scripts explicitly, set the MicrosoftAjaxMode property of the ScriptManager to Explicit."

As per the methodology used to delay loading of JavaScripts after visible content, all resource files(.axd) should be included in Filesets.xml.

Now find out where the error has occured in the script reference for eg:
ScriptResource.axd?d=PG8nyU-48dBLIokilQnXoklX6EpGEQ3aTy3vcRWmvg0DcIYhtPYFxJ8hwJRjuu3W0&t=ffffffffd40de07f

comment out the script resource in the xml. Timer control should not be included as part of combine scripts and hence the respective script resource should be commented.

Also to view any resource file that has been included in the xml just open the resource in Visual Studio (File -> Open when website is running) . for eg: if the location is

ScriptResource.axd?d=PG8nyU-48dBLIokilQnXoklX6EpGEQ3aTy3vcRWmvg0DcIYhtPYFxJ8hwJRjuu3W0&t=ffffffffd40de07f

the url for this would be

http://localhost:49405/WebSiteOne/ScriptResource.axd?d=PG8nyU-48dBLIokilQnXoiLgocTATYIx-0XXTsaGMX5FZyBIBPiYYV8fYhHJhy9o0&t=ffffffffd40de07f


Computers can figure out all kinds of problems, except the things in the world that just don't add up.
James Magary

2 comments:

  1. I have found another nice post related to this post over the internet which also explained very well. For more details you may check it by visiting this url.....

    http://mindstick.com/Articles/2bd1d5f5-3c79-4ba3-a3fc-0b58f3a262a8/?Ajax%20Toolkit%20Timer%20Control%20in%20ASP.Net


    Thanks

    ReplyDelete

Copyright © 2013 Template Doctor . Designed by Malith Madushanka - Cool Blogger Tutorials | Code by CBT | Images by by HQ Wallpapers