Peyton, you're on the right track in trying to use the UNC path instead of a drive name. But I'll bet you are running into a permissions issue. Check to see what account the CF server runs under. If it is LocalSystem, that is most likely not going to work as it will have no permissions to access the directory on the other server. You'll need to run it under a normal user account, which you should be doing anyway. Running CF as LocalSystem is not considered to be a better practice anyway.
----- Original Message ---- From: Peyton Todd <[EMAIL PROTECTED]> To: [email protected] Sent: Thursday, April 24, 2008 3:43:33 PM Subject: [ACFUG Discuss] How Load Files from Outside the Web Directory - Corrected (Reading through what I wrote, there were a few other errors, so I send this version to clear up possible confusion. Sorry.) My web site needs to load PDFs which are located in a different directory (in fact, on a different disk drive) than the one on which the site's web pages reside. In developing this website by working as localhost on my own desktop PC at home, the following code works flawlessly: <cfcontent file = 'D:/Styles/553/55303.pdf'> The web page containing the above line of code, and everything else in the site, is on a subdirectory of C:/Inetpub/wwwroot/. And in real life the parameter 'D:/Styles/553/55303.pdf' is a #variable# which can evaluate to that path among others; I'm hard-coding it here to simplify the example. My problem is that this must work on a network where the target is in a virtual directory on a different box. Since that virtual directory presents itself to us humans as drive J, the value of the file attribute in the above <cfcontent> tag presumably becomes 'J:/553/55303.pdf'. But when I plug 'J:/553/55303.pdf' into the above tag, both Firefox(FF) and Internet Explorer(IE) complain that the file does not exist. A different approach is suggested by the fact that Windows Explorer (a.k.a 'My Computer') shows the 'real(?), or underlying(?) location corresponding to virtual drive J to be "Styles on 'dsm=svr1-acr'". The Help desk at Leapfrog (the company which built my client's network) suggested that I use '//dsm-svr1-acr/553/55303.pdf' instead of 'J:/553/55303.pdf'. But when I try that, FF says it 'can't establish a connection to the server at dsm-svr1-acr'; and IE says 'Page cannot be displayed'. The third method I tried was to use <cflocation> istead of <cfcontent>, as below: <cflocation url="J:/553/55303.pdf">. I would assume <cflocation> should be equivalent to the <cfcontent> tag in this situation since, based on the Livedocs, the difference between the two seems to be only that <cfcontent> provides extra capabilities such as specifying the MIME type, loading from a variable instead of a file, and deleting the file after its contents are loaded to the page; and none of those capabilities are needed here. Is there any a priori reason why I should prefer one of these tags to the other here? In any case, when I try the code with <cflocation> as above, sometimes the PDF is loaded exactly as desired, and sometimes it is not. So far I have so far not been able to figure out what determines success or failure. When it does NOT work, FF sometimes interprets the letter J as a protocol, and reports that it 'doesn't know how to open this address because the protocol (J) isn't associated with any program'. At other times it simply loads a blank page with no error message (based on my notes, this seems to depend on whether the value of the url attribute was substituted vs. hard-coded but I'm not sure of this). As to IE, when the <cflocation> method does not work, I get a javascript message saying 'Error: Member not found' (I neglected to mention that the page containing the <cfcontent> or <cflocation> tag is actually loaded to a child window via the javascript code: win=window.open(showpdf,'Style','width=800,height=500,resizable=yes') where showpdf evaluates to the url of the page containing the <cfcontent> or <cflocation> tag, with the path to the file as part of its query string. Can anyone shed light on what's happening here, and what I should be doing to make this work? ------------------------------------------------------------- Annual Sponsor FigLeaf Software - http://www.figleaf.com To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by http://www.fusionlink.com ------------------------------------------------------------- ------------------------------------------------------------- Annual Sponsor FigLeaf Software - http://www.figleaf.com To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by http://www.fusionlink.com -------------------------------------------------------------
