14 Replies Latest reply on Dec 11, 2007 4:21 AM by IURex

    cfajaxproxy

    kruse Level 1
      I have made a mapping in the iis called /kost
      I then call the ajaxproxy like this

      <cfajaxproxy cfc="/kost/AuthenticationSystem" jsclassname="AuthenticationSystem" />

      It works until the javascript is run to use the function in the component.

      var auth = new AuthenticationSystem();
      auth.validateCredentials()

      When I look what it tryes to run the path is
      http://z9102853.dk.capgemini.se/AuthenticationSystem.cfc?method=validateCredentials&

      but it should be

      http://z9102853.dk.capgemini.se/kost/AuthenticationSystem.cfc?method=validateCredentials&

      why does it not go to my mapping /kost?
        • 1. Re: cfajaxproxy
          Level 7
          hmm... iirc the cfc attrib of cfajaxproxy tag requires a dot-delimited
          path to a cfc, not /-delimited...

          --

          Azadi Saryev
          Sabai-dee.com
          http://www.sabai-dee.com
          • 2. Re: cfajaxproxy
            kruse Level 1
            quote:

            Originally posted by: Newsgroup User
            hmm... iirc the cfc attrib of cfajaxproxy tag requires a dot-delimited
            path to a cfc, not /-delimited...



            Yes ofcause.
            I have now changed it to

            <cfajaxproxy cfc="kost.AuthenticationSystem" jsclassname="AuthenticationSystem" />

            But with the same result.

            it still looks for AuthenticationSystem at http:\\server\AuthenticationSystem
            and not at the corect place http:\\server\kost\AuthenticationSystem

            Is it not possible to have the ajax cfc's in a sub dir not in the wwwroot??
            • 3. Re: cfajaxproxy
              CutterBl Level 1
              Have you tried to call the CFC directly from that path, verifying that it can be reached? Possibly an issue with your server resource/virtual directory mapping.
              • 4. Re: cfajaxproxy
                kruse Level 1
                When I call http://z9102853.dk.capgemini.se/\kost\AuthenticationSystem.cfc from the path I do get the cfc description.
                So I can reatch the mapping in this way.
                • 5. cfajaxproxy
                  kruse Level 1
                  I found this in Ben Forta's blog
                  http://www.forta.com/blog/index.cfm/2007/5/31/ColdFusion-Ajax-Tutorial-1-AutoSuggest#cFCFB A570-3048-80A9-EFE867939367DE55

                  We found our problem... using 'Virtual Directories' in IIS, the ColdFusion AJAX feature binding won't work (it just can't seem to find the cfc file). When the same files are installed on the web root, it works 100%.

                  What really threw us off was that, with our original configuration, the cfc's were accessible via a cfinvoke and via the url...

                  Unfortunately, it will be alot of work to re-configure our other webservers so that we can utilize these new features.
                  # Posted By Ed | 11/1/07 4:51 PM


                  I think that this is an error in CF8. No one will put all there cfc's in the webroot just to be able to make an call using ajax. I'm waiting for an error fix from Adobe.

                  This is also why I do see
                  ttp://z9102853.dk.capgemini.se/AuthenticationSystem.cfc?method=validateCredentials&
                  and not (as it should be)
                  ttp://z9102853.dk.capgemini.se/ kost/AuthenticationSystem.cfc?method=validateCredentials&
                  • 6. Re: cfajaxproxy
                    justin_pfister
                    hey Kruse, I'm having the same exact problem.. It's identical in everyway.. Why is is messing up that /kost/ directory?? Well.. Let's keep this going. Let me know if you make any progress on the solution to this problem and not a work-around. Justin
                    • 7. Re: cfajaxproxy
                      kruse Level 1
                      Hi Justin, I have dropped using this cfajaxproxy.
                      Instead I have started to make my interfaces in Flex.
                      You can do more nice things in Flex than you can do in Coldfuision and Ajax.
                      Besides it can be transferred into Air (desktop application) with a little effort.
                      • 8. Re: cfajaxproxy
                        justin_pfister Level 1
                        thanks kruse! I appreciate your insights.
                        • 9. Re: cfajaxproxy
                          Level 7
                          here's from the CF8 Developers' Guide, Chapter 35, page 650:

                          Using bind expressions

                          To specify a bind expression, use one of the following formats:

                          cfc:componentPath.functionName(parameters)
                          Note:
                          The component path cannot use a mapping. The componentPath value must be
                          a dot-delimited path from
                          the web root or the directory that contains the current page.
                          .....


                          ---
                          Azadi Saryev
                          Sabai-dee.com
                          http://www.sabai-dee.com
                          • 10. Re: cfajaxproxy
                            kruse Level 1
                            Azadi, one thing is what the Development guide says and another thing is what works in real life.
                            I have tested this and I can’t get it to work.
                            The only way I can get it to work is if I place the cfc in the web root. What I don’t want to.
                            • 11. Re: cfajaxproxy
                              Level 7
                              hi kruse,

                              i was actually answering justin's previous comment "why is it messing up
                              that /kost/" directory?" and pointing out that what he (and you) was up
                              against is not a bug, but a documented way cf8 works: you CAN NOT bind
                              to a cfc located in a mapped directory outside of web root.

                              ---
                              Azadi Saryev
                              Sabai-dee.com
                              http://www.sabai-dee.com
                              • 12. Re: cfajaxproxy
                                justin_pfister Level 1
                                Thanks Azadi. It's nice to get concrete confirmation. Although it's documented, it did go against both of our logic of how we thought it should work, especially after we'd successfully completed other tasks, like calling an object from a mapped directory. I've been able to find a suitable work around as well as gain more working knowledge about the Coldfusion Environment.
                                • 13. Re: cfajaxproxy
                                  "No one will put all there cfc's in the webroot just to be able to make an call using ajax. I'm waiting for an error fix from Adobe."
                                  I agree 100%. I'm using IIS 5 web server as well. Adobe's CF8 project manager were not doing a good job.

                                  • 14. Re: cfajaxproxy
                                    IURex
                                    You don't need to put your CFC in the web root! It simply needs to be in a non-aliased directory OFF OF the web root. I placed a components directory in my CFIDE directory and it works just fine. You will however need a ColdFusion mapping to the first directory - in my case CFIDE.

                                    <cfajaxproxy cfc="CFIDE.components.myCompnent" jsclassname="myFuncs"> with my web root being "C:\inetpub\wwwroot" and the component file path as "C:\inetpub\wwwroot\CFIDE\components\myComponent.cfc". My ColdFusion mapping is "Logical Path = /CFIDE, Directory Path = C:\inetpub\wwwroot\CFIDE.

                                    Of course, the directories and files must have the proper permissions.