Forum Discussion

RobertoRandall's avatar
RobertoRandall
Copper Contributor
May 21, 2025

Error executing JScript

I switched from Windows Server 2022 to 2025. I migrated all my domains and it works fine, but with an error: I can't run a script like "<SCRIPT Language="JScript" RUNAT=SERVER>" because it gives me a 500 error. If I go to https://www.vidauna.com/aaa.asp, there's an example from Microsoft, and if the page is refreshed, it gives a 500 error (once yes, once no).

Looking for the reason for the error, I found it's because on another of my pages on the same domain I have set the string: "Session.Timeout = 20." If I create a new subdomain with just the example, it works fine, but without the example, I put:

<%
Session.Timeout = 20
%>

It starts doing the same thing. When I refresh the page (F5), it gives a 500 error, and if I refresh it again, it appears fine, and so on.

I've been searching for a solution for almost a month and can't find it. I can't have the page that uses JScript on the domain because it doesn't work (it worked fine on the previous server), and I'm trying to find the problem with the example.

What I think is that I need to configure something in Windows Server 2025's IIS to prevent this error, but I don't know what it is.

I hope someone knows the solution to this problem. Thank you. I'm Spanish, and the text was translated using Google Translate.

The content of the aaa.asp example is:

 

<%@ Language= "VBScript" %> 
<HTML>  
  <BODY> 
  <!-- Call the JScript procedure from within VBScript--> 
  <% call printDate() %> 
  <!--Call the VBScript procedure from within VBScrip--> 
<% Echo %>  
  <BR> 
  </BODY> 
</HTML> 

<%Sub Echo%> 
<!--Note: this will not output anything unless the page is called with a query string like https://localhost/test.asp?x=1%20have&y=a%20cunning&z=plan --> 
<% 
  Response.Write "<TABLE BORDER=1>" & _ 
    "<TR><TH>Name</TH><TH>Value</TH></TR>"  

  Set objQueryString = Request.QueryString  

  For Each strSelection In objQueryString 
    Response.Write "<TR><TD>" & strSelection & "</TD><TD>" & _  
    objQueryString(strSelection) & "</TD></TR>"  
  Next  

  Response.Write "</TABLE>"  

End Sub  
%> 

<SCRIPT Language= "JScript" RUNAT=SERVER>  

function printDate()  
{  
  var x 

  x = new Date()  

  Response.Write(x.toString())  
  Response.Write("<BR>") 
}  
</SCRIPT> 

 

 

The error is:

Información detallada de error:

Módulo   IsapiModule
Notificación   ExecuteRequestHandler
Controlador   ASPClassic
Código de error   0x00000000
Dirección URL solicitada   https://www.vidauna.com:443/aaa.asp
Ruta de acceso física   ...\aaa.asp
Método de inicio de sesión   Anónimo
Usuario de inicio de sesión   Anónimo
No RepliesBe the first to reply

Resources