-
Feb 6th, 2009, 06:27 PM
#1
Thread Starter
Fanatic Member
[RESOLVED] Ajax / LoadBalancing / and the ScriptResource.axd File
Hi all, here is my situation:
I have Server1 and Server2 load balancing - I have an AJAX page that uses an ajax timer to check the status of something and update the UI with results.
When I run the page specifying Server1 it works fine, likewise if I specify Server2. However, if I don't specify and I let the load balancer determine the server, all is well until one of the ajax postbacks goes to the alternate server - I then get the error message:
"Sys.ScriptLoadFailedException. The script '/mysite/ScriptResource.axd?d=......" failed to load.
When I enable script debugging in IE I get:
"Missing call to Sys.Application.notifyScriptLoaded()"
I made sure that the machinekeys are the same between both servers and ran a Fiddler trace to see what was going on - and the call to notifyscriptloaded does not occur when the ajax postback is routed to the other server after it has already hit the first server.
My setup is ASP.net 2.0 on Server2003, the page in question has a masterpage, and the script manager is in the page within a content region.
Anyone experience this or have a work-around. I don't think there is a way to tell it where to find the ScriptResource.axd file... Thanks for any help!
Last edited by VBCrazyCoder; Feb 9th, 2009 at 07:54 PM.
-
Feb 7th, 2009, 03:46 AM
#2
Re: Ajax / LoadBalancing / and the ScriptResource.axd File
The /mysite/ seems to be using the virtual directory name in the path. This may mean that you have the same problem as this guy -
http://plainoldstan.blogspot.com/200...sourceaxd.html
His solution was to give both paths to the application on both servers the same virtual directory name.
-
Feb 7th, 2009, 12:20 PM
#3
Thread Starter
Fanatic Member
Re: Ajax / LoadBalancing / and the ScriptResource.axd File
I thought that too but my virtual directories are exactly the same on both machines.
-
Feb 9th, 2009, 07:52 PM
#4
Thread Starter
Fanatic Member
[Resolved] Re: Ajax / LoadBalancing / and the ScriptResource.axd File
[RESOLVED] Turns out that .net 2.0 added a "t" parameter to the path for the ScriptResource.axd file, so that had to match across servers.
-
Jun 15th, 2009, 08:53 PM
#5
New Member
Re: [RESOLVED] Ajax / LoadBalancing / and the ScriptResource.axd File
How did you make sure that 't'e paramters are same in all servers.
Did you add it to another server as well ?
-
Jun 17th, 2009, 09:42 AM
#6
Thread Starter
Fanatic Member
Re: [RESOLVED] Ajax / LoadBalancing / and the ScriptResource.axd File
Since the "t" parameter relates to the LastModifiedDate on the System.Web.Extensions.dll in the GAC, you must make sure that the date matches across the servers.
You can view the dates using this (which also will show you the path):
Code:
Dim strFilePath As String = "C:\WINDOWS\assembly\gac_msil\system.Web.Extensions\1.0.61025.0__31bf3856ad364e35\System.Web.Extensions.dll"
Dim strFilePath2 As String = "C:\WINDOWS\assembly\gac_msil\System.Web.Extensions.Design\1.0.61025.0__31bf3856ad364e35\System.Web.Extensions.Design.dll"
MessageBox.Show("DT: " & File.GetLastWriteTime(strFilePath).ToString() & " || Design file: " & File.GetLastWriteTime(strFilePath2).ToString())
So just set them both to the exact same datetime and you should be good to go.
-
Jun 17th, 2009, 01:55 PM
#7
New Member
Re: [RESOLVED] Ajax / LoadBalancing / and the ScriptResource.axd File
Thank you very much,
I did find out that modified dates were wrong as the AJAX Control Tool Kit assemblies were in GAC.
For a solution, I have put them on server's bin directory as copying them in bin directory does not change the modified date.
Not sure why putting the file in GAC would change the modified date to a date when it was placed there.
Anyway, I have a solution so its all fine.
Thanks again for your help
-
Jun 17th, 2009, 05:06 PM
#8
Re: [RESOLVED] Ajax / LoadBalancing / and the ScriptResource.axd File
Because that's the GAC's way of saying "Hey the copy I haver is good as of the date it was dropped into here...." which means it's possible to load an older version of an assembly into the GAC.... ick... the implications of that...
-tg
-
May 27th, 2015, 01:45 PM
#9
New Member
Re: [RESOLVED] Ajax / LoadBalancing / and the ScriptResource.axd File
I know this is an old thread, but I have the exact same issue in a W2k8 server cluster. An app deployed in both, using a load balancer.
when you say:
Originally Posted by VBCrazyCoder
So just set them both to the exact same datetime and you should be good to go.
What do you mean exactly? How do I "set the last modified datetime" to those files in the GAC??
And.. the datetime has to match between System.Web.Extensions.dll and System.Web.Extensions.Design.dll? Or for those files between the servers??
thanks
-
Jun 2nd, 2015, 02:38 AM
#10
New Member
Re: [RESOLVED] Ajax / LoadBalancing / and the ScriptResource.axd File
I've same problem like you, my friend fixed it ..
------------------
Coque sony xperia z4
Last edited by dance; Jun 5th, 2015 at 02:50 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|