ok, sorry, I will explain again. C:\Inetpub\wwwroot\XYZ has test.cfm and
employee.cfc. There is only 1 site but I do have local copy setup for local
development with same folder structure. I can access my local code via
localhost as well via url of the site (setup on different machine).
test.cfm has this code <cfinput type="text" name="hrManager_1"
value="#hrManager_1#" autosuggestminlength="2" autosuggest="
cfc:Employee.fnGetEmployeeByFName({cfautosuggestvalue})">
I have this site, qa.charlie.com set up and files are at this location
C:\Inetpub\wwwroot\XYZ
i.e. in IIS under Home Directory tab, the local path is
C:\Inetpub\wwwroot\XYZ. On my local machine, I have the same structure
C:\Inetpub\wwwroot\XYZ.
On my local machine, I access the page via, localhost/XYZ/test.cfm which
works fine. When I access the site via url i.e. qa.charlie.com/test.cfm, I
get error CFC XYZ.Employee not found. By following your tip, I looked at
chrome debugging tools and here are the results
1. Request URL:
http://qa.charlie.com/XYZ/Employee.cfc
?method=fnGetEmployeeByFName&returnFormat=json&argumentCollection=%7B%22nameFirst%22%3A%22144%22%7D&_cf_nodebug=true&_cf_nocache=true&_cf_clientid=D156F681F0DEF525B78BCAFA4A351EFE&_cf_rc=1
2. Request Method:
GET
3. Status Code:
200 OK
4.
1. Host:
qa.charlie.com
2. Referer:
http://qa.charlie.com/T_AddEdit_Employee.cfm?employeesId=53679
So looks like when it requests, its requesting XYZ/Employee.cfc and not
Employee.cfc i.e its expecting employee.cfc to be under another subfolder.
I am expecting the request url to be
URL:
http://qa.charlie.com/Employee.cfc?method=fnGetEmployeeByFName. I dont know
why it looks for XYZ/Employee.cfc. Perhaps I am missing something obvious.
Ok, good question about mapping. I do not have any mapping setup on my
local server or on the dev (website) server. I have the default mappings
after CF install. About Application.cfc mapping via This.mappings, I have
not done that in my
application.cfc file or on dev server's application.cfc. I thought that was
part of 9.01 and not CF 9. I am I wrong in that assumption? Can you do that
in CF 9 also? If yes, then I guess thats what I need to do then.
Thanks. Let me know if its still confusing.
<Ajas Mohammed />
iUseDropbox(http://db.tt/63Lvone9)
http://ajashadi.blogspot.com
We cannot become what we need to be, remaining what we are.
No matter what, find a way. Because thats what winners do.
You can't improve what you don't measure.
Quality is never an accident; it is always the result of high intention,
sincere effort, intelligent direction and skillful execution; it represents
the wise choice of many alternatives.
On Sun, Apr 8, 2012 at 9:35 PM, Charlie Arehart <[email protected]>wrote:
> Ajas, I don’t recognize the problem immediately, but unless someone else
> does and comes to the rescue, here are a few thoughts to consider that may
> help you (or help you help us):
>
> First, are you positive that the two websites are setup identically on the
> two different machines? I mean specifically the docroot, for instance. You
> don’t clarify, though you do imply it. Worth just confirming.
>
> Second, since this autosuggest feature generates a request from the client
> to the server (as coded by CF, of course), you may want to use a tool like
> firebug or any of many other tools to watch the communication between the
> client and the web server. it may be interesting to see what the client
> asks for. Consider also that what it asks for is of the web server: you
> could still have some other possible confusion caused once it leaves the
> web server and gets to CF.
>
> Third, do you have a mapping setup in the CF Admin (check in both your
> local and the other server)? And what about in this.mappings in any
> application.cfc that may control the page? Again, check on both boxes.
>
> Again, I’m just grasping at straws here. No real idea of the problem or
> solution. Hope these thoughts may help.****
>
> ** **
>
> /charlie****
>
> ** **
>
> *From:* [email protected] [mailto:[email protected]] *On Behalf Of *Ajas
> Mohammed
> *Sent:* Sunday, April 08, 2012 2:41 PM
> *To:* [email protected]
> *Subject:* [ACFUG Discuss] CFC path - bind autosuggest issue****
>
> ** **
>
> Hi,****
>
> ** **
>
> I have a weird issue. We have website on IIS 6, CF 9.****
>
> Website webroot : C:\Inetpub\wwwroot\XYZ Inside this XYZ folder I have my
> cfm and cfcs. No subfolders.****
>
> ** **
>
> I have this code in test.cfm. Both test.cfm and Employee.cfc are in same
> folder C:\Inetpub\wwwroot\XYZ****
>
> <cfinput type="text" name="hrManager_1" value="#hrManager_1#"
> autosuggestminlength="2" autosuggest="cfc:Employee.fnGetEmployeeByFName
> ({cfautosuggestvalue})">****
>
> ** **
>
> If i access this on my local machine it works fine. If I access it via
> website we have setup using same C:\Inetpub\wwwroot\XYZ folder, I get error
> on this code saying XYZ.Employee was not found. ****
>
> ** **
>
> So looks like when its running test.cfm, its looking for another XYZ
> folder then Employee.cfc i.e. C:\Inetpub\wwwroot\XYZ\XYZ\Employee.cfc . I
> dont know why its doing this because I am thinking relative path should
> work ie. test.cfm and employee.cfc are in same folder so my code should
> work. Going by error description, I created the folder XYZ\XYZ\Employee.cfc
> and it works fine. If my code was cfc:XYZ.Employee.fnGetEmployeeByFName then
> I can understand I need another XYZ subfolder because of . reference.****
>
> ** **
>
> I am stumped on this one. If i access the site without url on our dev
> server it works fine. ****
>
> ** **
>
> Any suggestions?****
>
>
> <Ajas Mohammed /> ****
>
> iUseDropbox(http://db.tt/63Lvone9)
> http://ajashadi.blogspot.com
> We cannot become what we need to be, remaining what we are.
> No matter what, find a way. Because thats what winners do.
> You can't improve what you don't measure.
> Quality is never an accident; it is always the result of high intention,
> sincere effort, intelligent direction and skillful execution; it represents
> the wise choice of many alternatives.****
>
> ** **
>
> -------------------------------------------------------------
> 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 FusionLink <http://www.fusionlink.com>
> -------------------------------------------------------------