asp.net ajax sys undefined solution

  • 2020-05-10 17:58:36
  • OfStack

This error occurs when 2 files are missing and placed in the project or server root

New notepad, just type a few letters, and save them as the following two files, upload can be solved

WebResource axd, ScriptResource axd

Or refer to the following method: everyone may encounter the reason is not the same.

First of all, let's take a look at the problem of the comrades on the Internet although they are all "Sys is not defined ", but the situation is not the same, some people use the Atlas version, some use the Asp.net ajax Beta, some are the official version of Asp.net ajax Beta, so the solution is different. The following is a brief summary of the existing methods:
1. Web.config configuration:
Configure the relevant sections in Web.config as follows, and then recompile your program:
 
<HTTPHANDLERS> 
<REMOVE path='"*.asmx"/' verb='"*"'> 
<ADD path='"*.asmx"' verb='"*"' PublicKeyToken='31bf3856ad364e35"/' Culture="neutral," Version="1.0.61025.0," Microsoft.Web.Extensions, type='"Microsoft.Web.Script.Services.ScriptHandlerFactory,' validate='"false"'> 
<ADD path='"ScriptResource.axd"' verb='"GET"' type='"Microsoft.Web.Handlers.ScriptResourceHandler"' validate='"false"/'> 
</HTTPHANDLERS> 
<COMPILATION debug='"true"'> 
<ASSEMBLIES> 
<ADD PublicKeyToken='31BF3856AD364E35"/' Culture="neutral," Version="1.0.61025.0," assembly='"Microsoft.Web.Extensions,'> 
</ASSEMBLIES> 
</COMPILATION> 

If there are still mistakes, try < asp:ScriptManager id="ScriptManager1" runat="server" AsyncPostBackTimeout="200" / > Written in the following < form > In the tag

2. Authority issues:
This type of error occurs when anonymous users are unable to access axd files. For a discussion of this, see the script error in Asp.net Ajax: the undefined solution for Sys, which is discussed in detail by the author here

3. The problem of IIS is caused by the problem of IIS version. For example, the server operating system you are using is 2000 server, etc., you need to upgrade them to the latest version, which is mainly for the upgrade of IIS. Win2003 users can download it from the following address to the relevant patch http: / / download microsoft. com/download/seven/b d b1f473c / 1/7-547-4196 - b00d - bf3aa2a3e898 / WindowsServer2003 - KB912812 x86 -- ES71E N.exe (you are advised to install sp2 and update it in real time)
Discussion we can also see 1 under discussion here: blog garden - http: / / www cnblogs. com ltc31 / archive 2006/09/20/510003. html

4. Class library problems:
If the problem is really here, it should be easier to solve. You just need to follow the steps below
To http: / / ajax. asp. net downloads/beta/default aspx? tabid=47&subtabid=471 download 1 library file and unzip it to X:\Program Files\Microsoft ASP.NET \ ASP.NET 2.0 AJAX \ v1.0.61025 (x represents your installation path character)
Can be

5. Some people mentioned that there would be a problem with access by IP, and it would be normal to use Localhost or domain name. Here I guess it is a problem of cache, so I can update the cache to see if it can be solved

6. In addition, as for the anti-virus software, if your anti-virus software is sensitive, you may kill some js programs, which may lead to such problems

7. Of course, the first thing you need to check is that your browser has not disabled the javascript script.

8. My own solution: after trying the above methods, I failed to solve the problem well, so I deleted all the Asp.net Ajax, including ToolKits, and then downloaded the latest version of Ajax from asp.net and installed it. After the successful installation, two tabs Ajax Extions and Ajax ToolKits were added to VS's toolbox, respectively. After the installation, I didn't have them... You might as well also try 1, said that after the successful installation can be used normally

9, the problem of the program itself: if you have your own Javascript code in the program, you need to carefully check the code situation after the client side is executed, to see if some variables were used before being defined, especially pay attention to the loading order, in a word, this is one of the reasons why the sys type is not defined

Related articles: