Solved

ASP - Including a file that is on FTP...

Posted on 1998-07-29
4
250 Views
Last Modified: 2013-12-25
This is what I am doing...I am taking a report file (.txt)that is generated on the mainframe (MVS) and using an FTP job, sending it over to the FTP service on IIS 4.0.

What I want to do is #include this .txt file into an HTML or ASP file that is on the actual web site which I have created using Frontpage 98. The reason I want to do this is to control the font size so that it will print on one page width and also provide the user with navigation as well. I can get the #include to work if the report file is on the web site (http:) but I can not get the report to include if the report is on ftp. I also tried to put the ASP file on the FTP server, so that both files were in the same place, but that didn't work either. The report files will be updated very frequently so it is important to automate the process of bringing in these reports, so I don't want any manual intervention.

Another important piece of info is that both the web server and ftp server are physically on the same machine so I don't understand why this isn't working.  

Any ideas?
0
Comment
Question by:aguldber
  • 2
  • 2
4 Comments
 
LVL 28

Accepted Solution

by:
sybe earned 200 total points
Comment Utility
the #include statement only works when a relative link is used, you cannot include a file using something like <!-- #include virtual="http://anotherserver/file.txt"-->

The easiest way to solve your problem is to make a virtual http-directory to the text file and use this path in an include statement.

You can still upload the file using ftp. The directory will be approachable both by ftp and http.

0
 

Author Comment

by:aguldber
Comment Utility
How do I create this virtual directory?  Where do I create this directory - on the FTP server or the web server?
0
 
LVL 28

Expert Comment

by:sybe
Comment Utility
Creating a virtual directory with IIS4 (with the webserver):

1. open the IIS management console (program files, windows NT4 option pack, internet information server, internet service manager).
2. in the left "window" find "default web site" and right click.
3. choose "new" and then "virtual directory"
4. type the name you want to give it (click next)
5. select the directory (browse), you should select the directory which will contain the text file. (click ok)
6. it must be a "read" directory


Remember the name of the virtual directory.

Now you can include a text file by:

<!-- #include virtual="/name_of_virtual_directory/file.txt" -->

0
 

Author Comment

by:aguldber
Comment Utility
Worked great...Thanks!!!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now