• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cfajaxproxy

Guest
Oct 31, 2007 Oct 31, 2007

Copy link to clipboard

Copied

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?
TOPICS
Advanced techniques

Views

1.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 31, 2007 Oct 31, 2007

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 01, 2007 Nov 01, 2007

Copy link to clipboard

Copied

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??

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Nov 01, 2007 Nov 01, 2007

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 05, 2007 Nov 05, 2007

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 05, 2007 Nov 05, 2007

Copy link to clipboard

Copied

I found this in Ben Forta's blog
http://www.forta.com/blog/index.cfm/2007/5/31/ColdFusion-Ajax-Tutorial-1-AutoSuggest#cFCFBA570-3048-...

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&

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 13, 2007 Nov 13, 2007

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 14, 2007 Nov 14, 2007

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 14, 2007 Nov 14, 2007

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 14, 2007 Nov 14, 2007

Copy link to clipboard

Copied

thanks kruse! I appreciate your insights.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 14, 2007 Nov 14, 2007

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 15, 2007 Nov 15, 2007

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 15, 2007 Nov 15, 2007

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Dec 07, 2007 Dec 07, 2007

Copy link to clipboard

Copied

"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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 11, 2007 Dec 11, 2007

Copy link to clipboard

Copied

LATEST
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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation