Wrox Programmer Forums
|
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
 
Old February 15th, 2005, 03:29 PM
Registered User
 
Join Date: Feb 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to muinaru
Default Server.Execute

Per page 284 in Beginning ASP 3.0, Server.Transfer and Server.Execute may use absolute page references.

However, when an absoulute reference is attempted, this error is returned:

"Invalid URL form or fully-qualified absolute URL was used.
Use relative URLs."

Microsoft KB articel #247420 (http://support.microsoft.com/default...b;en-us;247420) lists the following status for this:

Microsoft has confirmed that this is a problem in IIS 5.0 online documentation.

This behavior is by design.
 
Old February 15th, 2005, 03:45 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

 Are you using querystring? Though the error shows something different, according to that article, the problem was with querystrings.

Brian
 
Old February 15th, 2005, 06:00 PM
Registered User
 
Join Date: Feb 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to muinaru
Default

Brian,

This is the exact line from my source (note the use of a test file):

Server.Execute "http://192.168.1.16/owners/Data/xyz.htm"

This is one of three different ways I've tried it.

Allan
 
Old February 16th, 2005, 02:34 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Is that a page within your application, if so, why the full link, and if not, it may be because it is an external link, but I am unsure.

Brian
 
Old February 16th, 2005, 09:23 PM
Registered User
 
Join Date: Feb 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to muinaru
Default

Beginning ASP 3.0 indicates that the destination can be on a different site (so, a full URL definition is needed).

I need for my application to display periodically updated information from a different computer on the LAN. Either I pull from the other computer, or, I have to have my web server update that info from the other machine and place the results so I can pull a relative link*.

The Server.Execute [absolute reference] seemed a very quick and easy way to do this.

My Server.Execute doesn’t have a query string; also, it works for relative references (*when I test it against the same page brought into the web server).

Thanks,

Allan
 
Old February 17th, 2005, 07:55 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

Quote:
quote:
Beginning ASP 3.0 indicates that the destination can be on a different site
This sounds just plain wrong to me. server.execute is much more limited than this - I just don't see how you would be able to execute an asp page on another server. In fact I doubt if you can even server.execute another asp page in a different 'application' on the same server. The reason I say this is beacuse all the server collections, including the Application, Session etc, are supposed to be available to the Execute'd page - surely that's going to cause all sorts of conflicts if the 2 pages are in different applications, let alone on different servers.

Just my 2c

rgds
Phil
 
Old February 17th, 2005, 11:17 AM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

Server.execute method uses only Relative path, and only execute the page if this file is on the same server and same application (virtual directory).

Cheers :)

vinod
 
Old February 18th, 2005, 09:30 PM
Registered User
 
Join Date: Feb 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to muinaru
Default

This is where I started; perhaps it's the documentation. In any case, I haven't had success with an absolute reference:

In chapter 7, on page 284 of Wrox’s Beginning Active Server Pages 3.0, Server.Execute & Server.Transfer are briefly described, then this paragraph appears:

“In both cases. The value of DestinationPage could be a string value, or hold a valid URL that the browser would then be told to retrieve. The destination page should be formatted just like a hyperlink would. If the URL is on the same site, then a relative reference can be used. If it is on a different site, then you need to include a full http:// reference.”

Thanks for all of the help!
 
Old March 13th, 2005, 01:33 PM
Registered User
 
Join Date: Mar 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

To do this, I would try using MSXML and the response.text to grab your page on the other box. I use this all the time.

set myXML = CreateObject ("MSXML2.serverXMLHTTP.4.0")
    myXML.open "GET","http://mysite.asp", false
    myXML.send ()
    theStr = theStr & "<style>"
    theStr = theStr & myXML.responsetext
    theStr = theStr & "</style>"


Terrill
 
Old March 13th, 2005, 01:36 PM
Registered User
 
Join Date: Mar 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ignor the <style> lines... i coppied the code over from a page in which I was using this to get a style sheet.

Terrill





Similar Threads
Thread Thread Starter Forum Replies Last Post
OPENQUERY vs EXECUTE on a linked server? aaqqqa SQL Server 2005 1 May 28th, 2007 06:52 AM
Difference between SSI and server.execute rekha_jsr ASP.NET 1.0 and 1.1 Basics 5 November 8th, 2004 12:46 PM
Server.Execute() Error handling nickelsberry Classic ASP Professional 2 April 14th, 2004 04:45 PM
Server.Execute RobinR Classic ASP Basics 2 October 31st, 2003 11:44 AM





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