PRB: Remote Scripting Error If You Change Server Language to JScript (259389)



The information in this article applies to:

  • Microsoft Active Server Pages

This article was previously published under Q259389

SYMPTOMS

If you change the server-side script language from Microsoft VBScript to Microsoft JScript in a server Active Server Pages (ASP) page that is used for remote scripting, the following error message appears:
Remote Scripting Error
REMOTE SCRIPTING ERROR: Page invoked does not support remote scripting.

CAUSE

Within the server-side script page, a remote scripting function called RSDispatch() is called. The error occurs because the public_description object, which is utilized by the RSDispatch() function, has not been created.

RESOLUTION

To resolve the error, ensure that the public_description object is created before you call RSDispatch(). You can accomplish this by simply making the call to RSDispatch() as the last command on the page.

For example, change
<%@ LANGUAGE=JScript%>

<!--#include file="_ScriptLibrary/rs.asp"-->

<% RSDispatch() %>

<SCRIPT Language=JavaScript RUNAT=SERVER>

	function Description()
	{ 
		this.TestFunction = TestFunction;
	}
	public_description = new Description();

	function TestFunction()
	{
	    return "Hello world!";
	}
</SCRIPT>
				
to:
<%@ LANGUAGE=JScript%>

<!--#include file="_ScriptLibrary/rs.asp"-->

<SCRIPT Language=JavaScript RUNAT=SERVER>

	function Description()
	{ 
	    this.TestFunction = TestFunction;
	}
	public_description = new Description();

	function TestFunction()
	{
	    return "Hello world!";
	}

        RSDispatch();
</SCRIPT>
				

STATUS

This behavior is by design.

Modification Type:MajorLast Reviewed:7/27/2001
Keywords:kbDSupport kbprb kbRemoteProg kbScript KB259389