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



The information in this article applies to:

  • Microsoft Active Server Pages
  • Microsoft Internet Explorer (Programming) 4.0
  • Microsoft Internet Explorer (Programming) 4.01
  • Microsoft Internet Explorer (Programming) 4.01 SP1
  • Microsoft Internet Explorer (Programming) 4.01 SP2
  • Microsoft Internet Explorer (Programming) 5
  • Microsoft Internet Explorer (Programming) 5.01
  • Microsoft Internet Explorer (Programming) 5.5

This article was previously published under Q274852

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).

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.

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


Modification Type:MajorLast Reviewed:10/23/2003
Keywords:kbinfo kbRemoteProg kbScript KB274852 kbAudDeveloper