try having CF run as a real user NOT as the default.

"Helen Warren" <[EMAIL PROTECTED]> wrote:
Hi All,
I wonder if you could help me. I am trying to create a word document from a
web page as follows:

First get the contents of the page using cfhttp:
<cfhttp
url="#application.rooturl#templates/regionalcompanylist.cfm></cfhttp>

Next set a file name giving it a .doc extension:
<cfset rannum = RandRange(1,1000)>
<cflock scope="SESSION" type="READONLY" timeout="30">
<cfset filename="regionalcompanies_#session.userid##rannum#.doc">
</cflock>

Write the file using the cfhttp.filecontent:
<cflock name="regionalcompanylistrobot" timeout="30" type="EXCLUSIVE">
<cffile action="write" file="#application.rootfilepath##filename#"
output="#trim(cfhttp.FileContent)#">
</cflock>

Relocate the user to the created file which automatically opens up word:
<script language="JavaScript">
document.location.href = '<cfoutput>../files/#filename#</cfoutput>';
</script>

This all works fine on my own laptop running Apache/Windows 98/CF4.0 however
when I transfer the application to our server (IIS/Windows NT/CF4.5) it
prompts me for a username and password when writing the file and when I look
inside the created word doc I just see my login page. In other words, the
page I go to
on my cfhttp request thinks that the session is not logged in.

Any ideas? Do we have to set up some file permissions in Windows NT? Do we
have to set up a special NT user for Cold Fusion?
Helen.



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists


____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebarRsts

Reply via email to