• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 744
  • Last Modified:

cfinclude from another server

i have a coldfusion website.
i want to include mycfmpage.cfm page (which is on a anotherserver ) using cfinclude in my coldfusion website. Is this possible?
I tried sharing the folder in which mycfmpage.cfm resides and then mapping that folder as Z:\ on the original server where my coldfusion website resides and then adding that mappign into coldfusion administrator website.... But it did not work

pl help..

i cannot use cfhttp because i am afraid if it will change the whole design of my website
0
at999
Asked:
at999
  • 5
  • 2
  • 2
  • +2
3 Solutions
 
parikaaCommented:
You can map the the folder in the cf admin mappings

http://www.adobe.com/livedocs/coldfusion/6.1/htmldocs/tags-p63.htm


ColdFusion searches for included files in the following sequence:

1. In the directory of the current page
2. In directories mapped in the ColdFusion Administrator for the included file
0
 
at999Author Commented:
Yes, but my files are on different servers.....
0
 
parikaaCommented:
There should still be a way:

http://kb2.adobe.com/cps/961/9616b854.html
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
ThatSharepointGuyCommented:
There are a few things you could do, but you've already covered what I would have tried first : adding the Z:\myDirectory\myFile.cfm to the CF Mappings within CF Admin page.  

Have you tried putting in the full url path in the cfinclude?  I've never tried to go cross-server, so i'm not sure if it would work, but perhaps you can do that.


0
 
_agx_Commented:
(no points)

>  But it did not work

It's probably because the account the CF Service is running under doesn't have sufficient permissions to access that drive.  Permissions are explained in the link parikaa posted above.
0
 
azadisaryevCommented:
by default CF runs as LOCAL SYSTEM user, and has no access rights to any network resources.
if you want cf to access network shares, you must run cf as a user (account) that has proper access rights to the share, and use UNC path to access it (not mapped drive letter).
the adobe kb article parikaa linked to above explains how to do this (see Option 1 there).

Azadi
0
 
at999Author Commented:
wow let me try that
0
 
at999Author Commented:
Thanks a lot ...
Running CF service as a network-admin type of user and putting in shared name - \\myotherserver\mywebsite into cf mappings list worked!!!

thanks to all of you...
0
 
at999Author Commented:
i have some security issues with this method - my supervisor does not like putting in userid/password on the service name ... any ideas/solutions? thanks
0
 
ThatSharepointGuyCommented:
The above experts who answered you question might know a different way to do it, but since I didn't stop monitoring this, i thought i'd add something in -

It doesn't matter what your supervisor does or does not like doing.  If he has a better way, he can put forth the method to do it by himself.  If he does not have any ideas about how to get it accomplished with a different method - he can eat this solution or re-think the way he product needs to be rolled out.

Just my 2 pennies.
0
 
_agx_Commented:
AFAIK, there isn't another way.  But to minimize risks, you really should use an account with only the minimum permissions needed - and not an admin level account.  Other than that, your only option is cfhttp, which has it's own disadvantages, like an extra http request.
0
 
at999Author Commented:
thnks again

what type of account should it be? like what permissions it should have, i too donot want to use an administrator account
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 2
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now