0

I'm trying to invoke a component from another code file and running into a problem.

This is what I have tried.

<cfinvoke component="cfc.FileMove" method="transferFile" >
This causes the page to fail. 

<cfset beginMove = CreateObject('component', 'cfc.FileMove')>
This approach fails here, but is used in other areas of the application. 

<cfinvoke component="FileMove" method="transferFile" >
This works, but obviously  because its located in the same folder as the file I'm invoking from. 

I've also tried using the # signs as demonstrated in the Adobe documentation. The cfc.FileMove format is used in other locations in the application but it fails in this file and no errors are given in the logs.

The file I'm working with is located at C:\inetpub\wwwroot\dev\adminFiles The CFC's are located at C:\inetpub\wwwroot\dev\cfc. According to the last person who worked with it, the cfc's are mapped in the CF server. I don't understand how when I simply run a <cfinvoke> as I do on my test machine with success, it fails in the application.

Alex
  • 443
  • 3
  • 18
  • Maybe "FileMove" is not your real CFC name, but you should consider using a more appropriate name. "FileMove" is the name of a ColdFusion function as well. You're asking for trouble. – Evik James Jun 23 '15 at 15:57
  • Its the name of the cfc because its located in that folder and I've double checked. But to be safe even if I try to call a different CFC, with the above formats. I get the same problem. I've tried calling a CFC called userData.cfc and the issue is the same. – Alex Jun 23 '15 at 16:05
  • Try calling the CFC with – Evik James Jun 23 '15 at 16:17
  • You wrote "According to the last person who worked with it, the cfc's are mapped in the CF server." Can you verify that, both the name and the path? – Barry Sep 21 '15 at 21:23

0 Answers0