Copy link to clipboard
Copied
necesita declarar cfobject en Application.cfc, pero me da el siguiente error:
en Application.cfc defino de la siguiente forma:
<cfobject component="geti_des.proc.dominioAD" name="dominioAD">
You should in fact move from Application.cfm to Application.cfc. In any case, that has nothing to do with the error.
Is the component path /geti_des/proc.dominioAD.cfc valid? Try the following:
<cfif fileExists(expandPath("/geti_des/proc/dominioAD.cfc"))>
<cfinvoke component="geti_des.proc.dominioAD" method="consDominioAD" returnvariable="qDominioAD">
<cfelse>
Componente no encontrado en esta ruta.
</cfif>
Copy link to clipboard
Copied
I'm not allowed to delete this. I keep coming up with questions, but then re-read your post and they get answered.
If the code you provided from within your application.cfc is as it currently exists, you're missing equal signs. If not, I'm not sure what to do.
V/r,
^ _ ^
Copy link to clipboard
Copied
Apparently, you want the object dominioAD to be available throughout the application. Hence, across every request and every session and irrespective of the component path.
If so, then use:
<!--- In Application.cfc --->
<cfobject component="geti_des.proc.dominioAD" name="application.dominioAD">
<!--- On the CFM page --->
<cfinvoke component="#application.dominioAD#" method="consDominioAD" returnvariable="qDominioAD">
Copy link to clipboard
Copied
Gracias, hice la prueba de esa forma pero sigue dando el mismo error;
Si ese mismo código lo utilizo en un Application.cfm si me funciona
<cfobject component="geti_des.proc.dominioAD" name="dominioAD">
Y el llamado lo realizó de esta forma:
<cfinvoke component="#dominioAD#" method="consDominioAD" returnvariable="qDominioAD">
Pero lo que quiero es pasar todo a un Application.cfc
Copy link to clipboard
Copied
You should in fact move from Application.cfm to Application.cfc. In any case, that has nothing to do with the error.
Is the component path /geti_des/proc.dominioAD.cfc valid? Try the following:
<cfif fileExists(expandPath("/geti_des/proc/dominioAD.cfc"))>
<cfinvoke component="geti_des.proc.dominioAD" method="consDominioAD" returnvariable="qDominioAD">
<cfelse>
Componente no encontrado en esta ruta.
</cfif>
Copy link to clipboard
Copied
Según la validación, la ruta del componente si es válida