Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | 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 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
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 15th, 2005, 03:29 PM
Registered User
 
Join Date: Feb 2005
Location: Wilmington, NC, USA.
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.
Reply With Quote
  #2 (permalink)  
Old February 15th, 2005, 03:45 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
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
Reply With Quote
  #3 (permalink)  
Old February 15th, 2005, 06:00 PM
Registered User
 
Join Date: Feb 2005
Location: Wilmington, NC, USA.
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
Reply With Quote
  #4 (permalink)  
Old February 16th, 2005, 02:34 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
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
Reply With Quote
  #5 (permalink)  
Old February 16th, 2005, 09:23 PM
Registered User
 
Join Date: Feb 2005
Location: Wilmington, NC, USA.
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
Reply With Quote
  #6 (permalink)  
Old February 17th, 2005, 07:55 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , United Kingdom.
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
Reply With Quote
  #7 (permalink)  
Old February 17th, 2005, 11:17 AM
Friend of Wrox
 
Join Date: Oct 2004
Location: delhi, delhi, India.
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
Reply With Quote
  #8 (permalink)  
Old February 18th, 2005, 09:30 PM
Registered User
 
Join Date: Feb 2005
Location: Wilmington, NC, USA.
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!
Reply With Quote
  #9 (permalink)  
Old March 13th, 2005, 01:33 PM
Registered User
 
Join Date: Mar 2005
Location: Fort Worth, Texas, USA.
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
Reply With Quote
  #10 (permalink)  
Old March 13th, 2005, 01:36 PM
Registered User
 
Join Date: Mar 2005
Location: Fort Worth, Texas, USA.
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
Reply With Quote
Reply


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



All times are GMT -4. The time now is 04:07 PM.


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