Home > front end >  Asp file of lines of code, after more than a certain number will be out of the 500 error, there is a
Asp file of lines of code, after more than a certain number will be out of the 500 error, there is a

Time:10-02

Have an asp file, because the include a lot of asp file, and so the total lines of code is very much, to a certain number of more, will be out of the 500 error, of the program, and that there is no hint of a 500 error,

Is certainly not the error of the program code itself, I have done the test, such as an empty asp file, add the most simple code, such as & lt; A=% 1% & gt; , just this one line of code, and then copy, rows after more than a certain number of, will be out of the 500 error, the cap on the number of uncertain, more than 43000 code, will be out of the 500 error,

Excuse me, is there a solution, this is the need to change an iis Settings? , or a need to change the server Settings?

CodePudding user response:

Is more than the response buffer limits of the IIS Settings, refactor the code can use the WSC,

CodePudding user response:

Open the PHP error display (PHP ini: display_errors=On)
According to the page display error message

CodePudding user response:

, a file of more than 40000 lines of code, it's too crazy.

CodePudding user response:

reference X - I - n reply: 3/f
, a file of more than 40000 lines of code, it's too crazy,


Is not a file, but the include files of lines of code is entered, so the open file to use,

CodePudding user response:

There is only one curve to saving the
1, use the include file
2, however, the include files also calculate lines of code, so much the include files, still make mistakes,
3, so, can only include files dynamically, the include file itself does not support dynamic files,
4, can't, can only use this function to perform the include files, this is the equivalent of the include files dynamically,

<% 'solve the include no file for variables, the include files asp statement can not branches, such as if then end if an asp statement must be
The Function include_1 (FilePath)
'Dim re_1 content_1, fso_1, f_1, aspStart_1, aspEnd_1

The set stm_1=server. CreateObject (" adodb. Stream ")
Stm_1. Type=2 'in this mode read
Stm_1. Mode=3
Stm_1. Charset="utf-8"
Stm_1. Open
Stm_1. Loadfromfile server. MapPath (FilePath)
Str_1=stm_1. Readtext
Stm_1. Close
The set stm_1=nothing


Content_1=str_1

The set re_1=new RegExp
Re_1. The pattern="^ \ s *="
AspEnd_1=1
AspStart_1=inStr (aspEnd_1 content_1, "& lt; % ") + 2
The do while aspStart_1 & gt; AspEnd_1 + 1
Response. Write mids (content_1 aspEnd_1, aspStart_1 aspEnd_1-2)
AspEnd_1=inStr (aspStart_1 content_1, % \ & gt; "" ) + 2
Execute (re_1. Replace (mids (content_1 aspStart_1, aspEnd_1 aspStart_1-2), "the Response. Write"))
AspStart_1=inStr (aspEnd_1 content_1, "& lt; % ") + 2
Loop
Response. Write mids (content_1 aspEnd_1)
'set stm_1=nothing
End the Function
% & gt;

CodePudding user response:

Really not line, with WSC, runat=server also can have a try,

CodePudding user response:

IIS response buffer limit

CodePudding user response:

refer to 7th floor with float soft hedgehog response:
IIS response buffer limit


Is not this reason, tried to] IIS response buffer limit set to a very large, such as 2000000000, has hundreds of millions, the equivalent of 200 m, or will go wrong,

CodePudding user response:

Local test, 60000 lines of code is normal also, let's check your code,
  •  Tags:  
  • ASP
  • Related