Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

INFO: Data Is Truncated When You Use Remote Scripting to Pass Data


View products that this article applies to.

This article was previously published under Q274852

↑ Back to the top


Summary

When you use Remote Scripting to pass data, the data may be truncated after 2,083 characters, or the entire data may not be transferred. This problem occurs because Remote Scripting uses the QueryString property (GET method) to pass data. Because the GET method uses a uniform resource locator (URL) to pass data, and because Internet Explorer has a maximum URL length of 2,083 characters, your strings cannot exceed 2,083 characters (minus the actual length of the path and URL encoding).

↑ Back to the top


More information

Steps to Reproduce Behavior

  1. Create a new HTML page named TestRS.htm, and paste the following code:
    <HTML>
    <HEAD>
    <TITLE> Test Page </TITLE>
    
    <script LANGUAGE="JavaScript" src="_ScriptLibrary/RS.HTM"></script>
    
    <SCRIPT LANGUAGE=javascript>
    <!--
    RSEnableRemoteScripting("_ScriptLibrary");
    
    function button1_onclick() {
    MyTextArea=textarea1.value;
    RemoteVar=RSExecute("testRSfunc.asp","AppendText",MyTextArea);
    textarea2.value=RemoteVar.return_value;
    }
    
    //-->
    </SCRIPT>
    </HEAD>
    
    <BODY>
    <TEXTAREA rows=20 cols=101 id=textarea1 name=textarea1></TEXTAREA><BR>
    <TEXTAREA rows=20 cols=101 id=textarea2 name=textarea2></TEXTAREA><BR>
    <INPUT type="button" value="Click Here After typing in first textarea" 
    id=button1 name=button1 LANGUAGE=javascript onclick="return button1_onclick()">
    
    </BODY>
    </HTML>
    					
  2. Create a new Active Server Pages (ASP) page named TestRSfunc.asp, and paste the following code:
    <%@ LANGUAGE=VBSCRIPT %>
    <% RSDispatch %>
    <!--#INCLUDE FILE="_ScriptLibrary/RS.ASP"-->
    
    <SCRIPT RUNAT=SERVER LANGUAGE="JavaScript">
    
       var public_description = new ServerMethods();
       function ServerMethods()
    	{
    	this.AppendText = AppendText;
    	}
    
    	function AppendText(myStr)
    		{
    		return myStr+"!";
    		}
    
    </SCRIPT>
    					
  3. In your browser, view TestRS.asp.
  4. In the first textbox, input more than 2,000 characters, and then click the button.

    NOTE: The character limitation may vary according to the length of your URL path.

↑ Back to the top


References

For additional information, click the article numbers below to view the articles in the Microsoft Knowledge Base:
208427� INFO: Maximum URL Length Is 2,083 Characters in Internet Explorer
254786� PRB: Query String Truncated

↑ Back to the top


Keywords: KB274852, kbscript, kbremoteprog, kbinfo

↑ Back to the top

Article Info
Article ID : 274852
Revision : 3
Created on : 10/23/2003
Published on : 10/23/2003
Exists online : False
Views : 465