I did understand there was only one site. I was referring to the two variants of it on the two machines, one local (working for you) and one on another server (not working for you), right? I was asking: are you positive that the website definition in IIS is indeed identical, especially with respect to the docroot definition. You say below, "On my local machine, I have the same structure" but you refer again only to the path to the files, not clarifying if for sure that this is defined as the webroot on this other machine.
As far as the browser debugging tool showing it linking back as /XYZ/Employee.cfc, that's helpful, as at least now you know it's not related to how the server is responding to the call for employee.cfc. The problem (if any) is in the HTML generated that put the link on the page. Now, since it's an autosuggest in a CFINPUT, it's a little harder to understand then why it adds that /xyz, but that's the evidence trail you want to follow. As for the this.mappings and whether it's in 9.0 or 9.0.1, yes, those were added in 9.0.1. If you're wondering why I mentioned it then when you said you were on "cf 9", it's just that people often use that term generically, regardless of whether they've applied the updater or not. If you're on 9.0, then no, app-specific mappings are not an issue for you to worry about as a possible cause/influence. (And I wasn't saying it was something that you might "need to do" at all. I was just wondering if it could have been having an influence.) Since the problem is in the client code generated by HTML (doing the bind back to the server), I would start by looking at the HTML source (once generated by CF) to see if there are previous references to /xyz anywhere in the HTML code, that might explain how CF is somehow thinking and telling the HTML (and Javascript) to consider that as a significant part of the path back to the server. I assume you have already checked the CFML page to make sure there's no reference to that /XYZ also, whether in the page or in any application.cf*, right? Finally, if I can offer a tip to help in communications on the list here: a couple of times you slip into referring to your dev box as "the website", as in "on my local server or on the dev (website) server". In the first note you also said "If I access it via website we have setup", which had confused me at first, until I realized you were referring to "the server other than my local machine" (it wasn't clear then, either, if it was a dev or prod box). I realize why within your organization you may refer to that other box as now "the website" but it's risky in a conversation on a list like this, since we're using the term "web site" to refer more accurately to the term as used for the thing defined within the web server. (And so you also don't want to call it "the web server", since you similarly do have a "web server"-software-running on both machines.) It would be better just to stick with "my local server" and the "the dev server" or something like that, to avoid any confusion for readers. :-) HTH /charlie From: [email protected] [mailto:[email protected]] On Behalf Of Ajas Mohammed Sent: Sunday, April 08, 2012 11:44 PM To: [email protected] Subject: Re: [ACFUG Discuss] CFC path - bind autosuggest issue 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&returnFor mat=json&argumentCollection=%7B%22nameFirst%22%3A%22144%22%7D&_cf_nodebug=tr ue&_cf_nocache=true&_cf_clientid=D156F681F0DEF525B78BCAFA4A351EFE&_cf_rc=1 2. Request Method: GET 3. Status Code: <chrome-devtools://devtools/Images/successGreenDot.png> 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://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://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> ------------------------------------------------------------- ------------------------------------------------------------- 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 -------------------------------------------------------------
