For most of our users everything works great, but for some the ToolkitScriptManager fails to send the combined script file. I have tracked this down to the fact that some of our user's browsers are sending the request for the combined script with an & in the url instead of a &.
For example:
http://localhost/SampleWebSite/CombineScriptsHandler.ashx?_TSM_HiddenField_=ctl00_SampleContent_ScriptManager1_HiddenField&_TSM_CombinedScripts_=%3b%3bAjaxControlToolkit%2c+Version%3d1.0.10920.13776%2c+Culture%3dneutral%2c+PublicKeyToken%3d28f01b0e84b6d53e%3aen%3a01dcc732-0d6b-49c9-ab98-940b93157f18%3ae2e86ef9%3a9ea3f0e2%3a9e8e87e9%3a1df13a87%3a9758eba%3a80f47b59
Instead of:
http://localhost/SampleWebSite/CombineScriptsHandler.ashx?_TSM_HiddenField_=ctl00_SampleContent_ScriptManager1_HiddenField&_TSM_CombinedScripts_=%3b%3bAjaxControlToolkit%2c+Version%3d1.0.10920.13776%2c+Culture%3dneutral%2c+PublicKeyToken%3d28f01b0e84b6d53e%3aen%3a01dcc732-0d6b-49c9-ab98-940b93157f18%3ae2e86ef9%3a9ea3f0e2%3a9e8e87e9%3a1df13a87%3a9758eba%3a80f47b59
This is due to the fact that in ToolkitScriptManager.cs line 216, the value placed in combinedScripts is null. This is directly caused by that html escaped &.
string combinedScripts = request.Params[CombinedScriptsParamName];
You can reproduce this error by running the SampleWebSite code from the toolkit source and trying the above urls in your browser. The first url will throw an error, and the second url will work correctly.
I don't know why for some of our users, their browser is screwing up the & in the url, but it is happening.
One way to fix the issue is to replace line 216 in ToolkitScriptManager.cs with the following code:
string combinedScripts = request.Params[CombinedScriptsParamName];
if (String.IsNullOrEmpty(combinedScripts)) {
combinedScripts = request.Params["amp;"+CombinedScriptsParamName];
}
But this seems like a really silly way to fix the issue.
Comments: This issue should not be closed, im still getting in with the latest release of ajax control toolkit.. HTTP/1.1, GET, /Forms/Public/NoticeListForm.aspx?_TSM_CombinedScripts_=True&v=A4sRFgGfV4mfd4EZMC1du8QjF0BC31YW_Px8RQK22ys1&_TSM_Bundles_=&cdn=False
For example:
http://localhost/SampleWebSite/CombineScriptsHandler.ashx?_TSM_HiddenField_=ctl00_SampleContent_ScriptManager1_HiddenField&_TSM_CombinedScripts_=%3b%3bAjaxControlToolkit%2c+Version%3d1.0.10920.13776%2c+Culture%3dneutral%2c+PublicKeyToken%3d28f01b0e84b6d53e%3aen%3a01dcc732-0d6b-49c9-ab98-940b93157f18%3ae2e86ef9%3a9ea3f0e2%3a9e8e87e9%3a1df13a87%3a9758eba%3a80f47b59
Instead of:
http://localhost/SampleWebSite/CombineScriptsHandler.ashx?_TSM_HiddenField_=ctl00_SampleContent_ScriptManager1_HiddenField&_TSM_CombinedScripts_=%3b%3bAjaxControlToolkit%2c+Version%3d1.0.10920.13776%2c+Culture%3dneutral%2c+PublicKeyToken%3d28f01b0e84b6d53e%3aen%3a01dcc732-0d6b-49c9-ab98-940b93157f18%3ae2e86ef9%3a9ea3f0e2%3a9e8e87e9%3a1df13a87%3a9758eba%3a80f47b59
This is due to the fact that in ToolkitScriptManager.cs line 216, the value placed in combinedScripts is null. This is directly caused by that html escaped &.
string combinedScripts = request.Params[CombinedScriptsParamName];
You can reproduce this error by running the SampleWebSite code from the toolkit source and trying the above urls in your browser. The first url will throw an error, and the second url will work correctly.
I don't know why for some of our users, their browser is screwing up the & in the url, but it is happening.
One way to fix the issue is to replace line 216 in ToolkitScriptManager.cs with the following code:
string combinedScripts = request.Params[CombinedScriptsParamName];
if (String.IsNullOrEmpty(combinedScripts)) {
combinedScripts = request.Params["amp;"+CombinedScriptsParamName];
}
But this seems like a really silly way to fix the issue.
Comments: This issue should not be closed, im still getting in with the latest release of ajax control toolkit.. HTTP/1.1, GET, /Forms/Public/NoticeListForm.aspx?_TSM_CombinedScripts_=True&v=A4sRFgGfV4mfd4EZMC1du8QjF0BC31YW_Px8RQK22ys1&_TSM_Bundles_=&cdn=False