Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP XML
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP XML Using ASP 3 and XML. See also the XML category for more XML discussions not relating to ASP. 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 XML section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 4th, 2009, 03:41 AM
Registered User
Join Date: May 2008
Location: Guwahati, Assam, India.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem with XMLHTTP in ASP 3.0

Hi i have been trying to get the contents from a webpage using MSXML2.ServerXMLHTTP . Although i had done the same in past without any issues..
but now while get a content from a page , i am getting no response.text . Have checked the status it says 200. Seems like the problem is due to character encoding . Below the is the page in question
Code i am using is
Set xmlHttp = Server.Createobject("MSXML2.ServerXMLHTTP")
xmlHttp.Open "GET", strUrl, False
xmlHttp.setRequestHeader "User-Agent", "asp httprequest"
xmlhttp.setRequestHeader "Content-type", "text/xml; charset=utf-16"
getHTML = xmlHttp.responseText
set xmlHttp = Nothing
response.write getHTML

Can u please guide me how to get the contents..
Reply With Quote
  #2 (permalink)  
Old March 4th, 2009, 10:09 PM
Friend of Wrox
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts

Yes, it sure looks like character set problem. I assume you tried utf-8, as well?? (But it doesn't "look" like UTF-8.)

It also does *NOT* look like XML, so why are you asking for "text/xml" as the content-type???
Reply With Quote
  #3 (permalink)  
Old March 5th, 2009, 03:03 AM
Registered User
Join Date: May 2008
Location: Guwahati, Assam, India.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts


I had even tried using the following .. still i not able to see any out ..

xmlhttp.setRequestHeader "Content-type", "text/HTML; charset=utf-8"
I m getting no clue .. why this is happening ..!!! :-((
Reply With Quote
  #4 (permalink)  
Old March 25th, 2009, 05:26 AM
Registered User
Join Date: May 2008
Location: Guwahati, Assam, India.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default XMlhttp.responsebody


I finally got the solution.. here is the tweak..

just replaced
   getHTML = xmlHttp.responseText 

getHTML = xmlHttp.ResponseBody

Thanks for replying Old Pedant

Suraj jain
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Posting XML to an ASP page using XMLHTTP Kells Classic ASP XML 5 April 24th, 2014 05:54 AM
Problem with using POST method with XMLHTTP vvr Classic ASP XML 1 December 6th, 2004 01:44 AM
problem parsing html using MS.XMLHTTP awardle Classic ASP XML 1 September 15th, 2003 11:38 PM
Problem With Microsoft.XMLHTTP binod XSLT 2 August 13th, 2003 02:33 PM

All times are GMT -4. The time now is 05:11 PM.

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