Summary: This section provides more detail about the support for specific ASP classic technologies and the way in which the they are supported. |
Files contained within the <SCRIPT> tag without the "runat = server" attribute will be considered as containing client code only. This can cause syntax errors during the analysis if you have an ASP file contained within the <SCRIPT> tag. One possible solution is to ignore this type of coding by replacing the expression <SCRIPT src="XXX/XXX.asp" > with <SCRIPT> via the Text Replacement feature.
The number of lines of code (LOC) of a Web file is calculated according to the formula:
If a file contains two distinct comment blocks on the same line and if there is part of a statement between the two blocks, CAST AIP counts two comment lines instead of one. In the following example, two lines are counted:
return /* Comment 1 */ 0; /* Comment 2 */ |
Implicit declaration of events is not supported. Thus such events are not displayed and no link to the procedure is found.
2015-11-05 22:07:32.477 Warning SYNTAX ; Body Syntax error : [W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}} |
The following section lists technical and functional aspects with regard to analysis of ASP source code:
Although CAST AIP handles classic ASP (Active Server Pages) applications "out of the box" with the ASP analyzer, the HTML5 and JavaScript extension is also capable of analyzing classic ASP applications. Below is a comparison of the analysis of the same classic ASP application with results from the HTML5 and JavaScript extension on the left and results with the ASP analyzer embedded in CAST AIP on the right: Some additional links are provided in certain situations: But less information in other situations: |
Situation
See http://tools.ietf.org/html/rfc2396 for a definition of what is considered as an URI |
Symptoms
Following warning is displayed during analysis:
Cannot find file whose path is "<URI-like string>". |
This warning has no impact on analysis results and can be safely ignored. Any "URI-like" string present in a javascript function is considered as a filename and an attempt is made to resolve it.
If a local variable has the same name as a function or a method (in JavaScript, Jscript, vbscript), the analyser will create a false link from the function (or method) containing the local variable to the function (or method) having the same name as the variable.
Example 1:
The following function will create a recursive link between the function falseLink and itself:
function falseLink(...){ var falseLink = a("newElement"); ... return falseLink; } |
Example 2:
The following two functions will create a link between the function ""a and the function "falseLink":
function falseLink(...){ ... } function a(...){ var falseLink = a("newElement"); ... return falseLink; } |
Because of the way in which the analyzer handles server-side code (i.e. code running on the web server) and client-side code (i.e. code executed in the web browser), an analysis may fail if the web file contains both types of code. The analyzer functions as follows:
For example, the following line of code containing both Java and JavaScript causes an analysis to fail (bold text is collected as client-side code):
String Var = <% If(Test) { %> val1 <% } else {%> Val2 <% } %> |
This is because the analyzer will first analyze the server-side code (in this case the Java code) and then the client-side code (in this case JavaScript). This results in the following client code being analyzed:
String Var = val1 Val2 |
This is syntactically incorrect. The error occurs on "Val2" and the analysis of the object containing the code fails. This limitation also applies even if server-side and client-side code appear on different lines in the same web file.
The analyzer produces a syntax error when encountering an HTML attribute inside a tag where the attribute value is closed by a double-quote but has no opening double-quote like in the following example:
<table border=0"> |
Please note that:
When specifying regular expressions in the Text Replacement feature in the .NET analyzer, you must ensure that the new text has the same length as the replaced text. Otherwise, an analysis may fail. Note that the issue will occur during the Metrics Assistant phase of the analysis, although Text Replacement is configured in the relevant .NET Analysis Unit or at Application or Technology level.
If a web file includes directly or indirectly two js files and if several js or vbs script methods with the same name exist, a link will be drawn to all of the methods, when the methods are referenced in the code.