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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HTTP Question!

Status
Not open for further replies.

ColdFusionKing

Programmer
Dec 5, 2002
145
GB
Hello everybody,

I'm trying to call a .asp file from my coldfusion page
using cfhttp and I keep getting errors. Both files are
on the same server, just different folders under the
site webroot.
This should explain it:

The ColdFusion file is in
C:\Inetpub\
and the ASP file is in
C:\Inetpub\
Can somebody show me how to use cfhttp to call the asp
file (menu.asp) in my coldfusion file
(searchreport.cfm)

Many Thanks
Allan
 
URL is the url of the file/page you want to bring in.
Path is used to save the http request to a file in a directory (specified in the PATH attribute), and file is used to name the saved file.

Check this out:


It gives you a detailed overview of all the attributes and what each one does.

Hope This Helps!

Ecobb
- I hate computers!
 
I would imagine it'll be something like:

Code:
<CFHTTP url=&quot;[URL unfurl="true"]http://yourdomain.com/myProject/site/includes/topmenu/folder2/menu.asp&quot;[/URL] method=&quot;GET&quot; ...>

<CFOUTPUT>#CFHTTP.FileContents#</CFOUTPUT>


As an aside... have you tried just using CFINCLUDE? If you have your server set up to process ASP, when you do a CFINCLUDE of an ASP page, the ASP should get processed before it's given back to the CFM page.

If that would work for you, I think you'll be much happier with the performance over using CFHTTP. But I'm not sure what you're actually trying to do with the ASP, so it may not be appropriate in your situation.



-Carl
 
yes, I have tried using CFInclude but get an error. I dumped the http response returned by the cfhttp tag


Output the Response Headers:

Date : Mon, 20 Oct 2003 15:20:34 GMT
Server : Microsoft-IIS/5.0
Content-Length : 4431
Content-Type : text/html
Explanation : Access Denied
Connection : close
Status_Code : 401
: NTLM
Http_Version : HTTP/1.1

Now somebody in other forum (
mentioned that I need to use HTTP authentication (mechanism described in RFC 2617) using the propietary NTLM system from Microsoft. I can't understand a word as to what that's supposed to mean.

So what I did was save the asp include file as a coldfusion file and invoked it using the cfinclude tag. The include file has html in it and a asp &quot;if&quot; condition which checks if the value of a session variable is &quot;true&quot;

<%
if session(&quot;user.supportuser&quot;) = &quot;TRUE&quot; then
%>


Do Something

<%
end if
%>

I am trying to re-write this in coldfusion but I don't know how to do it. Can ColdFusion read an asp session variable? I have tried to dump the session scope but get an error. I don't have a application.cfm file. If I can get this working then my problem is solved.
 
If you don't have an Application.cfm, can I assume that you don't have a CFAPPLICATION tag? If you don't have a CFAPPLICATION tag, you can't use the session scope. But I'm not even sure that the ASP session scope can be shared as the ColdFusion session scope.

The quickest solution would probably be to store the user.supportuser as a cookie... then both ColdFusion and ASP should be able to read/write it.



-Carl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top