MSXML2.ServerXMLHTTP Not Giving Url

I have been using the following code to access a remote url, which works fine, but if the remote "geturl" does a redirect (as the page in this code does), I have know idea what the redirected url is. Page still displays, (including the html source code), but I cannot determine what the base href is (that is, I don't know the url of the page being displayed, since is is a redirected page).

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<%
geturl ="http://schoolbonus.com/partner.asp?mpid=460"

dim objXML,displayText

Set objXML = Server.CreateObject("MSXML2.ServerXMLHTTP")
objXML.open "GET", geturl, False

objXML.send
displayText = objXML.responSetext
%>
<pre><%= Server.HTMLEncode(displayText) %></pre>
**************************************************

<%= displayText%>

View Replies


ADVERTISEMENT

MSXML2.ServerXMLHTTP

this code works with msxml4, but found out the server it ultimately will sit on only has ver 3 and they won't update. so, this code fails on the bold line and i can't figure out why.

Code:
Set httpReq = Server.CreateObject("MSXML2.ServerXMLHTTP" )
Set myXmlDoc = Server.CreateObject("MSXML2.DOMDocument" )
httpReq.Open "post", webServiceUrl, False
httpReq.setRequestHeader "Content-Type", "text/xml"
httpReq.setRequestHeader "SOAPAction", "soapserver/soap:CreatePreview#CreateGraphics"
httpReq.Send soapEnv 'fails here
returnSoapEnv = httpReq.responseText

View Replies View Related

MSXML2.ServerXMLHTTP Question

I've used MSXML2.ServerXMLHTTP in ASP to write a link checker. It checks a list of URLs stored in a db and flags any websites/webpages that are down. Since I am only interested in whether the page is up or not and not in the actual HTML, I use HEAD instead or GET.

Code:

Set getPage = Server.CreateObject("MSXML2.ServerXMLHTTP")
getPage.Open "HEAD", URL, false
where getPage is my object, URL is the URL to check
and I can also do

Code:
Set getPage = Server.CreateObject("MSXML2.ServerXMLHTTP")
getPage.Open "HEAD", URL, false , username , password

which checks the URL using the username and password supplied. Everything works as expected but my problem lies in the fact that the password is in plaintext in the ASP page. It is not good security practice to have an ASP page contain a username/password combo in plaintext. This means that if someone had file access to the ASP page (intranet) then they could see the username/password pair which we want to try
and avoid.

Does the HTTP standard only allow for username/passwords to be sent in plaintext?

View Replies View Related

MSXML2.ServerXMLHTTP And Sessions

I'm trying to integrate portions of a page on one domain into another domain. The goal is to use a rate calculator on the remote site to produce quotes on the main site. I have permission to do this. I'm using MSXML2.ServerXMLHTTP and it's working quite well except that I am unable to set a session cookie that seems to be required to generate a PDF on the remote site.

I've tried passing the session cookie thru MSXML2.ServerXMLHTTP, but that doesn't work. I've tried setting a cookie using ASP but it seems that PDF generation on the remote site requires the session cookie from the remote domain. I've tried setting a cookie with the domain property set to the remote site but the cookie is never written. I think this is a security feature in the Http Session State.

Is it possible to set a session cookie in MSXML2.ServerXMLHTTP with a remote host/domain? Can ASP be used to set a cookie with a domain other than the requesting domain? There seems to be a property to do this but I haven't been able to get it to work. Any other suggestions?

View Replies View Related

MSXML2.ServerXMLHTTP.3.0 Proxy Server

Consider the following simple function to get the contents of a remote URL:

Function GetURL(str_URL)
Set obj_XMLHTTP = Server.CreateObject ("MSXML2.ServerXMLHTTP.3.0")
obj_XMLHTTP.Open "GET", str_URL, False, "", ""
obj_XMLHTTP.Send
GetURL = obj_XMLHTTP.ResponseText
Set obj_XMLHTTP = Nothing
End Function

Is there anyway that I can use a remote proxy server to make the request?

View Replies View Related

MSXML2.ServerXMLHTTP Works Only With Text Files?

I'm trying to remotely get a pdf file - http://remoteServer/file.pdf - in order to store it into another server, maybe with Scripting.FileSystemObject

However the following code doesn't work properly:

------------
url = "http://remoteServer/file.pdf"
set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.open "GET", url, false
xmlhttp.send ""
------------

as xmlhttp.responseText does not contain the whole file textStream, but only a part of it.

View Replies View Related

Sending A Parameter To Webservice With MSXML2.ServerXMLHTTP?

How do I send an input-param to my web service with MSXML2.ServerXMLHTTP? Can this be done without the soap-toolkit? Code:

View Replies View Related

MSXML2.ServerXMLHTTP Returning Status 500 When Accessing Webservice

The following shows when I call it locally. If you look at the URL that has http://localhost, this is the one I use when I call the ASP page from the
same local server (self contained).

When I want to call the remote server (the one that fails) I use the other URL has http://remote.

I hope this helps..

Because the webservice is the same on both machines and I'm calling both machines the same, what would cause the remote machine to return that the Request form not recognized?

View Replies View Related

Call Localy MSXML2.ServerXMLHTTP Returning Status 500 When Accessing Webservice

That's better than internal server error. This is what came back, which is confusing because when its called locally it comes back fine. Am I missing something? ....

View Replies View Related

Access Web Server MSXML2.ServerXMLHTTP Returning Status 500 When Accessing Webservice

I am trying to access a webservice to post some values via MSXML2.ServerXMLHttp The OS used is win2003 on both machines.

When I access the local machine (A) which has the same service the call works great. When I access the other machine (B) that is on the same subnet, I get a Status of 500. Code:

View Replies View Related

ASP Giving Errors

I have made a Dll in VB. I am trying to make a word document by using a word template and then inserting data into the word file from my MS Access (Office XP) database. It works fine when I use the reference of this Dll in a form added in VB.

But gives me errors when I compile it and use it, by creating its object in ASP. It gives error 5981 : Could not open macro storage.I tried searching on microsoft website but could not implement the solution.I get a feeling that if a word reference is used in a dll and compiled and then used in ASP it gives no output. I am confused and frustrated as I have got the dll ready but can't use it in ASP pages.

View Replies View Related

Count Records Giving -1?

I'm trying to count the number of records in a database table but I keep getting the result of -1 which is incorrect. I'm sure this is a simple thing but I'd appreciate any ideas. The code is as follows:

set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open (Server.MapPath("..databasesphonebook.mdb"))
set rsCount=Server.CreateObject("ADODB.Recordset")
rsCount.open "RoleCodes", conn, adOpenStatic
response.Write(rsCount.recordcount)

View Replies View Related

Abort Instead Of Giving Error

I have the following code setup Code:

'Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP")
'xml.Open "POST", "http://192.168.1.197/default.aspx?" & PostData,False
'xml.Send()

What ends up happening, if the receiving server "192.168.1.197" is down, the script will error out, but what i need to do is if the site is unreachable have it continue without erroring out.

View Replies View Related

Server.createobject Giving Error

I'm getting this peculiar error while running my asp page :
Active Server Pages error 'ASP 0115'

Unexpected error

/iisHelp/common/500-100.asp

A trappable error (C0000005) occurred in an external object. The script cannot continue running.

Microsoft VBScript runtime error '800a01fb'

An exception occurred: 'createobject'

/mptender/mptenderall.asp, line 128

can't understand what's the problem

View Replies View Related

Giving The User Option To Expand Sections

I would like to set up the following:

The web user does a search of a database and the results are returned in an
HTML table. I want to present the user with a table that just shows the
salient facts (brief item description, stock value, etc).

However, I'd like to give the user the opportunity to expand (and if they
wish to contract again) any one row of the table to display things like a
picture and an extended description of the row item, rather than have them
go to a separate page for this.

I'd also like to give them the option to expand all rows in the table (and
contract them again) if they wished.

What's the best way to achieve this? I'm not sure of the target audience,
so may have to support browsers using HTML4 (may even be Netscape...)

View Replies View Related

Giving Access Permission To Specific User

I want to create directory and set access permission to specific user.

i tried with wscript but it's not working, i used "cacls" command it's working only NTFS partition but i used to fat32 . how to set directory permission with asp script
on fat32 so anyone help me?

View Replies View Related

Response.Redirect Giving 'Object Moved' Error!

I'm having a problem whenever i enter 2 response.redirects() in one funcion.. it's weird. What i'm trying to do is to display a simple error message underneath a login. But i'm trying to do it by sending the user back to the SAME page (not sure if that's even possible!) and passing a variable, notLogged, to test against. I hope this makes sense! Code:

View Replies View Related

Msxml2

I use "Msxml2.XMLHTTP" in a asp page, to save changes of database in a html
file. All worked well until I installed a new email server (ipswitch imail). Now this object don't work remotly, fire the error:

///////////////////////////////
msxml3.dll error '80072efd'
A connection with the server could not be established
//////////////////////////////

I check the page in a local session in the server and works well, but not in remote pc.
What is happening?

View Replies View Related

MSXML2.XMLHTTP

I use MSXML2.XMLHTTP to receive some HHTP responces from
remote server, unfortunatedly, it uses cookie-based auth.,
so I am unable to pass it, due to inability to store
cookies. How can I retrieve cookies from the headers of
HTTP response, and how can I add them to my request at the
next step?

View Replies View Related

How To Use MSXML2.DOMDocument In ASP?

I need to use MSXML2.DOMDocument in my ASP page. The following is my code:

xml.asp:
=====
<%
dim sx
sx="<root><a>text1</a><b>text2</b></root>"
dim xd
set xd=Server.CreateObject("MSXML2.DOMDocument")
xd.loadXML(sx)
Response.write xd.hasChildNodes
%>

Somehow, xd.hasChildNodes return False, i.e. there is nothing in the xd. I
guess the error was caused by missing the path of the MSXML2 library file. It seems
like the code doesn't know where the MSXML2.DOMDocument is. But the code didn't
generate any error.

View Replies View Related

MSXML2.HTTP

I am almost certain that I could use HTTP Post/Get to submit XML Web Service call (over SSL as well, if using Version 3 of MSXML2) from an ASP Application?

However, would I only be able to call web-service in a an asynchronous mode (with a callback function)? If so, how?

View Replies View Related

XML In ASP Wtih Msxml2.DOMDocument

Anyone having trouble 'Load'ing xml files with 'Msxml2.DOMDocument' in ASP?
The Server is IIS 5.1 and client is PocketPC2002 (Pocket IE). Code:

View Replies View Related

Msxml2.XMLHTTP Takes Too Long To Upload File

Uploading from browser to server using Msxml2.XMLHTTP takes a long time about 15 minutes for a 1.5MB file at 37.2Kbps, although it does get there. Is there anyway to speed things up?

Here's the code ...

View Replies View Related

MSXML2.XMLHTTP.3.0 Error :: The System Cannot Locate The Resource Specified

I am running the following code and I get an error:

Set xmlHttp = Server.CreateObject("MSXML2.XMLHTTP.3.0")
xmlHttp.Open "Get", URLToRSS, false
xmlHttp.Send
RSSXML = xmlHttp.ResponseText

The error is:

msxml3.dll error '800c0005'
The system cannot locate the resource specified.

It points to the "xmlHttp.Send" statement.

This code runs perfectly on my old ISP's server but not on my GoDaddy server.

View Replies View Related

ServerXMLHTTP

Am using MSXML4.0 serverXMLHTTP for communicating with a remote server. Using POST method of serverXMLHTTP to post a xml string but after calling send method its give "HTTP 1.1 405 method not allowed" in response status text.

View Replies View Related

ServerXMLHTTP Configuration

We use the following configuration on our development environment:
Server - win2k spk4
Local Computer - win2k spk3

We use the following code on the server to access a page on the local
IIS :

Set objSrvHTTP = Server.CreateObject ("MSXML2.ServerXMLHTTP.4.0")
strUrl = "http://" & strLocalComputer & "/maoz/ShowRecNum.asp"
objSrvHTTP.open "GET", strUrl , false
objSrvHTTP.send()
lngRecNum= objSrvHTTP.responseText
set objSrvHTTP = nothing

When strLocalComputer contains the local computer name, we get the
requested page. But if we use the IP address of the local computer we
get the error :

msxml4.dll (0x80072EE7)
The server name or address could not be resolved.

We manage to run the URL with the IP address from a browser on the
server but not from a browser on the local computer. Any ideas ?

View Replies View Related

ServerXMLHTTP And Impersonation

I've two Win2000 Advanced Server (ServerA and ServerB) both part of an Active Directory.
The Active Directory Server is named ServerC.

On ServerA I've published an asp page PageA.asp inside a virtual directory VirtuaA.
On ServerB I've published an asp page PageB.asp inside a virtual directory VirtuaB.

Inside both server I've installed Microsoft XML Parser 4.0 sp2

Both virtual directories have setted Windows Integrated Authentication.

PageA.asp has to get PageB.asp using ServerXmlHttp object and to show its contents.

When I try to get PageA.asp from any client part of the same active directory I obtain an error: I'm not authorized to get PageB.asp.

I've tried to use every solution founded on previous posts:

- proxycfg -d -p " " "*" on ServerA

- flag "trust for delegation" on Active Directory Control Panel of ServerC

- ASP instruction .setProxy 2, " ", "*" inside PageA.asp

Every solutions have failed....

View Replies View Related

AspHTTP Vs ServerXMLHTTP

I've been experimenting with both ServerObjects' AspHTTP and Microsoft's ServerXMLHTTP to access IMail. They both work fine, except for one weird thing.

To log in to IMail via login.cgi, it takes ServerXMLHTTP about 30 seconds. It takes AspHTTP about 1 second. Accessing any other IMail page, the two are virtually identical. But the login page is unacceptably long for ServerXMLHTTP.

Here's the code I'm using:

View Replies View Related

ServerXMLhttp Problem

I have been reading these posts and I thought I may be able to use serverXMLhttp for my current problem.

My company requires all of their divisions to use the same template for intranet sites. They (corp IT) changes this template often. I can use serverXMLhttp to read the their
site and dsplay everything. My problem is the .js and .css include files they use. How can I get this info into the correct format in my page and change their relative image links so that I can use their images.

I will have a few minor edits for links and one image change. I assume that can be done through Replace()

View Replies View Related

Issue With ServerXMLHTTP

I am trying to use ServerXMLHTTP to grab the HTTP Header from a page using the following code but it doesn't work.

<%
Response.Write "Output"
Set getPage = Server.CreateObject("MSXML2.ServerXMLHTTP")
getPage.Open "HEAD", "http://www.example.com", false
getPage.SetRequestHeader "Content-type", "text/html"
getPage.Send
Response.Write(getPage.responseText)
Set getPage = Nothing
%>

I want to use HEAD instead of GET in order to save bandwidth. I don't want to retrieve the full html of a page, just the HTTP header to know that a file exists:

HTTP/1.0 200 OK
or that a file is not found
HTTP/1.0 404 Not Found

This is for a link checker that I am writing. Does anyone know what I am doing wrong or does this object not recognise the HEAD parameter?

View Replies View Related

ServerXMLHTTP Problem...

I use ServerXMLHTTP object in order to force download dialog in my .asp file...
All my code is here: Code:

View Replies View Related

ServerXMLHTTP Connection

I'm trying to use a ServerXMLHTTP connection in async mode to request Page2.asp from Page1.asp.
Both pages are inside 2 different virtual directories with Windows Integrated Authentication but the user who requests Page2.asp is different from user has requested Page1.asp.The user of Page2.asp is IWAM_machine_name. If I use ServerXMLHttp in standard mode there is no problem.

View Replies View Related

ServerXMLHTTP, Session And Cookies

I try to use ServerXMLHTTP object to get the session infomation from a
remote webpage, but it always returns nothing.

the follwoing is my code:

*local.asp*
url = "http://domain/remote.asp"
set xmlhttp = Server.CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.open "GET", url, false
xmlhttp.send ""
Response.write xmlhttp.responseText
set xmlhttp = nothing

*remote.asp*
bLogin = Session("login")
sUserName = Request.Cookies("username")
Response.Write(nUserID & " " & sUserName)

although the session and cookie are not blank, but I cannot received any
info.

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved