Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can a CGI program create and send ASP to IIS?

Status
Not open for further replies.

rzward

Programmer
Nov 6, 2002
38
0
0
US
Hello,

I have a CGI script written in Perl that builds and sends HTML to the client browser. It works on many platforms including MS Windows.

I am wondering if there is a good way to have this CGI script also build ASP, somehow have the ASP processed by IIS and have the result sent to the client browser.

I have thought of having the CGI script create temporary .ASP files and redirect the client browser to the temporary .ASP files. I haven't tried this but am guessing this will work.

However, I'm wondering if there is a way to do this without creating temporary files.

For example, is it possible to have a CGI script call ASP.DLL directly, passing it a string containing valid ASP code? Or, is there an "eval" function in ASP that allows me to pass it valid ASP code and have it return the result of interpreting the ASP code?

I have looked through some books on ASP but haven't yet found any descriptions of doing something like this.

Any suggestions would be greatly appreciated.

Richard
 
seems redundant to try that process. why not just do everything on one set of standards. either CGI/perl or ASP



___________________________________________________________________
onpnt2.gif
[sub]
The answer to your ??'s may be closer then you think.
Check out Tek-Tips knowledge bank by clicking the FAQ link at the top of the page
[/sub]
 
Thank you for your reply.

I'm currently doing everything using CGI/perl. However, the script has a feature where it can load an HTML file, make changes to it and send it along to the browser.

I'd rather not rewrite the script but instead give an ASP version of it the ability to load an ASP file, make changes to it, have IIS or ASP.DLL process the changed version and send the result to the browser.

Having this feature would allow people using this script to have it also process ASP files in addition to HTML files.

I am pretty sure I can do this by having the script load the ASP file, make whatever changes that are necessary to parts of it, save it to a temporary file and redirect the browser to the temporary file.

But, I'm thinking it would be better to not involve temporary files at all. I can do this, for example, if ASP has an eval feature like Perl does. But, I can only find VBScript's eval function.

Thanks for your help.

Richard
 
if your runing your perl through Apache then you can jsut run ApacheASP and use perlscript for the lanuage.

___________________________________________________________________
onpnt2.gif
[sub]
The answer to your ??'s may be closer then you think.
Check out Tek-Tips knowledge bank by clicking the FAQ link at the top of the page
[/sub]
 
As it turns out, I already have an ASP variation of this script and it uses PerlScript.

All variations of the script have the same feature that allows the script to load a file, modify the contents of the file and then send it to the browser. It works well if the file to load contains HTML.

It sounds like ASP does not have a feature that allows even my PerlScript script to process a string just like an ASP file is processed -- leaving me to have the script create a temporary file and redirect the browser, if I want to do this at all.

Thanks for your help.

Richard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top