I'm making some updates to a Classic ASP page and I've noticed that when I add a lot of INCLUDES (ie. <!--#INCLUDE FILE="Foo.asp" -->), I get a generic "HTTP/1.1 500 Server Error" displayed in bold on the page.
This is notable in part because I normally get detailed error messages (error, file, line, etc.)
I've checked that none of those INCLUDES have errors. It seems like it has to do with the number of INCLUDES or the fully compiled size of the .asp file.
Is this something I can fix in the ASP settings for IIS?
I never heard about a limitation of includes. but it is possible that your result-page is too large. Did you remove some all includes and put them back step by step?
Alternately i prefer a type of dynamical includes. With my following function you have some advantages: you can include a file dynamically. Your result page will only include the neccascary files. Variables from the main script can be used in the included files. You can put the asp-code into a database.
But this way has one limitation: The whole included file must be written in ASP. So it's not allowed to use <%= date %>. It must be written as response.write date
I'm using a function to include asp-files: