Welcome to WebmasterWorld Guest from

Forum Moderators: ocean10000

Message Too Old, No Replies

Problem with XMLHTTP in ASP 3.0

7:29 am on Mar 4, 2009 (gmt 0)

New User

10+ Year Member

joined:Mar 4, 2009
posts: 2
votes: 0


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 .

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..

[edited by: coopster at 9:14 pm (utc) on Mar. 4, 2009]
[edit reason] removed url per TOS [webmasterworld.com] [/edit]

11:54 pm on Mar 4, 2009 (gmt 0)


WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month

joined:Jan 14, 2004
votes: 3

Well one of the things that I could think of is that they are blocking your request and setting a 200 status code, to make you pull your hair out.
9:30 am on Mar 25, 2009 (gmt 0)

New User

10+ Year Member

joined:Mar 4, 2009
posts: 2
votes: 0


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

just replaced

getHTML = xmlHttp.responseText


getHTML = xmlHttp.ResponseBody

Thanks for replying Ocean10000

Suraj jain


Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members