PRB: Data Property of a Remote Scripting Object Is Empty with IIS 5.0 Server (259649)



The information in this article applies to:

  • Microsoft Active Server Pages
  • 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 "500 Internal Server Error," 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 "200 OK". Reference this page in the "Custom Errors" section for your remote scripting server page or application. To do this, follow these steps:
  1. 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.
  2. Edit 500-100-OK.asp. Replace the following code
    Response.Status = "500 Internal Server Error"
    						
    with this:
    Response.Status = "200 OK"
    						
    NOTE: If the error message was not modified previously, the original line of code should be found on line 12.
  3. Save the file.
  4. 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.
  5. In Internect Services Mananger, right-click your remote scripting server ASP page, and then click Properties.
  6. 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.
  7. Modify the Path to point to /IISHelp/Common/500-100-OK.asp. Click OK twice to apply the changes.
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.

STATUS

This behavior is by design.

REFERENCES

For additional information, click the article number below to view the article in the Microsoft Knowledge Base:

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


Modification Type:MajorLast Reviewed:6/24/2004
Keywords:kbprb kbRemoteProg KB259649