Microsoft KB Archive/259649

= PRB: Data Property of a Remote Scripting Object Is Empty with IIS 5.0 Server =

Article ID: 259649

Article Last Modified on 11/21/2006

-

APPLIES TO


 * Microsoft Active Server Pages 4.0
 * Microsoft Internet Information Services 5.0

-



This article was previously published under Q259649



SYMPTOMS
If an error occurs in an Active Server Pages (ASP) page that was called by Remote Scripting from a client page, a property called data is assigned to the error message. This property is accessible to the client page that called the remote script and can be used to display an error message to the user. Under Internet Information Services (IIS) 5.0, the object contains no data.

For example, if you run the code provided in the following Microsoft Knowledge Base article, an empty result appears for the error message:

238284 HOWTO: Display Error Messages from the Server When Remote Scripting



CAUSE
IIS 5.0 has updated error handling capability (such as Server.GetLastError). As a result, the response for server-side script errors is now handled by a customized ASP page. This page (by default, http://Webserver/IISHelp/Common/500-100.asp) returns a status of &quot;500 Internal Server Error,&quot; which causes the client-side remote scripting applet to return no data to the remote scripting object.



RESOLUTION
To resolve this problem, create a custom error page that returns a status of &quot;200 OK&quot;. Reference this page in the &quot;Custom Errors&quot; section for your remote scripting server page or application. To do this, follow these steps:  Create a copy of %SystemRoot%\WinNT\Help\IISHelp\Common\500-100.asp, and store it in the same folder. Name the new file 500-100-OK.asp .  Edit 500-100-OK.asp. Replace the following code Response.Status = &quot;500 Internal Server Error&quot; with this: Response.Status = &quot;200 OK&quot; NOTE: If the error message was not modified previously, the original line of code should be found on line 12.  Save the file. From within the Internet Services Manager, double-click Internet Information Services to expand the list of Web servers. Click to expand your Web server. If your remote scripting ASP page resides in a Web application under one of the Web sites, click to expand your Web application. In Internect Services Mananger, right-click your remote scripting server ASP page, and then click Properties. Select Custom Errors. In the errors list, locate the entry for 500;100. By default, this will be set to a URL and refer to /IISHelp/Common/500-100.asp. Click Edit Properties.</li> Modify the Path to point to /IISHelp/Common/500-100-OK.asp. Click OK twice to apply the changes.</li></ol>

Note that this custom error page can be set on a page-by-page basis, for an entire application, or for the entire Web site or Web server.

<div class="status_section">

STATUS
This behavior is by design.

<div class="references_section">