Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old May 3rd, 2004, 03:17 AM
Authorized User
 
Join Date: Apr 2004
Location: , , .
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Default how to get http status code

Hi! Does anybody here know how to get http status code using ASP? I tried running the code from http://www.asp101.com/samples/http.asp
but I didn't see any result. It didn't even said that there's an error.

Can someone please help me? Thanks!

  #2 (permalink)  
Old May 3rd, 2004, 11:21 AM
Authorized User
 
Join Date: Jun 2003
Location: Rottum, , Netherlands.
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hmmm, I downloaded the code and it runs ok at my server. Did you install the MSXML component?

Regards,

Gerhard Wentink

Gerhard Wentink
  #3 (permalink)  
Old May 3rd, 2004, 10:24 PM
Authorized User
 
Join Date: Apr 2004
Location: , , .
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Just wanted to ask..was the status code displayed?
  #4 (permalink)  
Old May 3rd, 2004, 11:53 PM
Authorized User
 
Join Date: Jun 2003
Location: Rottum, , Netherlands.
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
Default

yes, but the html output is a bit quirky - no <html> tag etc. etc. - so sometimes the status code is hidden behind the page info. Look in the source of the page that is displayed.

Regards

Gerhard Wentink
  #5 (permalink)  
Old May 4th, 2004, 12:27 AM
Authorized User
 
Join Date: Apr 2004
Location: , , .
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I ran the code again..and the output in the source was...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
<BODY></BODY></HTML>

Can you please tell me what was the output when you tried it? I really can't display the status. Thanks!

  #6 (permalink)  
Old May 4th, 2004, 12:47 AM
Authorized User
 
Join Date: Jun 2003
Location: Rottum, , Netherlands.
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I made a request for www.asptoday.com and her are the first 16 lines of the source:

Status: 200 OK<br />

<h1>Here's The Page:</h1>
<table border="1" bgcolor="#FFFFFF">
<tr><td>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
    <HEAD>
        <title>ASP Today</title>
        <meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
        <meta content="C#" name="CODE_LANGUAGE">
        <meta content="JavaScript" name="vs_defaultClientScript">
        <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
        <LINK title="style" href="/asptoday.css" type="text/css" rel="stylesheet">
    </HEAD>

Gerhard Wentink
  #7 (permalink)  
Old May 4th, 2004, 02:53 AM
Authorized User
 
Join Date: Apr 2004
Location: , , .
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I still can't get it to work. I tried using WinHttpRequest instead..and it worked fine. Thanks Gerhard! Thank you very much for your time. =)



Similar Threads
Thread Thread Starter Forum Replies Last Post
HTTP Status 404 rivcam JSP Basics 7 June 3rd, 2008 09:32 PM
Http Status 500 ashutosh9910 Apache Tomcat 0 December 22nd, 2004 03:04 AM
http status code lian_a Classic ASP XML 0 May 3rd, 2004 10:28 PM
HTTP Status 405 - HTTP method GET .... nsakic Servlets 1 January 25th, 2004 04:50 PM
HTTP status 404 brianjs JSP Basics 2 October 26th, 2003 03:06 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.