AjaxControlToolkit 7.0123 crashes VS2012 web application project

I have an existing VS2012 web application that works fine until I added the latest AjaxControlToolkit (7.0123). Initially, I found that the installation violated the behavior of UpdatePanel - then, before I could refresh the page after asynchronous post-back without repeating the operation, I found that after installation the update would repeat the previous operation (I think that post-back was no longer asynchronous) .

Then I noticed that at some point in the past I commented on a few default JavaScript files that were added to a new ASP.NET Web Forms application, so I tried to add them back. This led to the exception:

'MsAjaxBundle' is not a valid script name. The name must end with '.js'.

Then I tried to replace the standard <asp:ScriptManager .../> with <ajaxControlToolkit:ToolkitScriptManager .../> , which led to a new exception

Failed to load file or assembly "System.Web" or one of the dependencies. The system cannot find the specified file.

For convenience, I created a new ASP.NET Web Forms application (VS2012, Update 2) and launched it. No mistakes. Using "nuget", I added AjaxControlToolkit v7.0123 (latest version). Run the application again and I will get the original exception again:

'MsAjaxBundle' is not a valid script name. The name must end with '.js'.

Again I replaced <asp:ScriptManager .../> with <ajaxControlToolkit:ToolkitScriptManager .../> , and again this leads to

Failed to load file or assembly "System.Web" or one of the dependencies. The system cannot find the specified file.

Can someone shed some light on what else I need to do to solve this problem? I can not find any documentation to say that something needs to be changed manually when adding tools.

Thanks,

+8
ajaxcontroltoolkit
source share
3 answers

The answer is found at http://stephenwalther.com/archive/2012/09/20/september-2012-release-of-the-ajax-control-toolkit.aspx (always immediately after posting a huh question)

  • Replace <asp:ScriptManager .../> with <ajaxControlToolkit:ToolkitScriptManager .../> correctly
  • Need to remove link to MsAjaxBundle
  • Need to remove Assembly = "System.Web" from script links

This fixes the exceptions (both in the new project and in the original).

However, it does not resolve the problem with UpdatePanel no longer sending asynchronously. I will raise this as a new question.

+12
source share

If you are using the April release of the Ajax Control Toolkit, see the last Steven Walter blog post:

http://stephenwalther.com/archive/2013/04/30/april-2013-release-of-the-ajax-control-toolkit.aspx

I missed the new web.config settings that allow the AjaxFileUpload control to work in the new version

 <configuration> <system.web> <compilation debug="true" targetFramework="4.5" /> <httpRuntime targetFramework="4.5" maxRequestLength="42949672" /> <httpHandlers> <add verb="*" path="AjaxFileUploadHandler.axd" type="AjaxControlToolkit.AjaxFileUploadHandler, AjaxControlToolkit"/> </httpHandlers> </system.web> <system.webServer> <validation validateIntegratedModeConfiguration="false"/> <handlers> <add name="AjaxFileUploadHandler" verb="*" path="AjaxFileUploadHandler.axd" type="AjaxControlToolkit.AjaxFileUploadHandler, AjaxControlToolkit"/> </handlers> <security> <requestFiltering> <requestLimits maxAllowedContentLength="4294967295"/> </requestFiltering> </security> </system.webServer> </configuration> 
+2
source share

When you see that "MsAjaxBundle" is not a valid script name. The name must end with ".js".

The best you can do is:

  • Go to the Master website (double click on it)
  • Search for "MsAjaxBundle" or ""
  • Comment on this line, for example. <% ----%>
  • Save or compile your program and then run it

Thank God it works now

0
source share

All Articles