Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 259649 - Last Review: November 21, 2006 - Revision: 3.1
PRB: Data Property of a Remote Scripting Object Is Empty with IIS 5.0 Server
This article was previously published under Q259649
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Â
(http://kbalertz.com/Feedback.aspx?kbNumber=238284/EN-US/
)
HOWTO: Display Error Messages from the Server When Remote Scripting
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.
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:
- 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 = "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. - 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.
- 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.
This behavior is by design.
For additional information, click the article number below
to view the article in the Microsoft Knowledge Base:
238284Â
(http://kbalertz.com/Feedback.aspx?kbNumber=238284/EN-US/
)
HOWTO: Display Error Messages from the Server When Remote Scripting
APPLIES TO
- Microsoft Active Server Pages 4.0
- Microsoft Internet Information Services 5.0
| kbprb kbremoteprog KB259649 |
Retired KB Content DisclaimerThis article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate