SES & coldboxProxy.cfc

I just started learning routes and such this weekend. I was surprised how well everything was going right out of the gate, but I ran into some troubles when I ran some jQuery .post code. My ajax .post URL is: coldboxproxy.cfc?method=process&event=calendar.getCalData. Naturally, ses interpreted this as such and throws the error ‘The event handler: calendar.coldboxproxy.cfc is not valid registered event.’ My question is, if index.cfm is my base URL, how do I use the coldboxProxy in this way?


Jason the proxy does not execute sea calls. More than likely you have
the isapi rewrite catching this. So in order to allow Cfc method calls
you need to put an exception for cfc calls in the rewrite not coldbox

I’m not using rewriting. It’s right out of the box. My sesBaseURL is ‘http://#cgi.HTTP_HOST#/index.cfm’.

For some reason it’s not being recognized as a proxy request. In my onRequestStart I am disabling debugging if the request is a proxy request, but in Firebug I can see the sidebar and all of the debugging info.


Sorry but I am kind of lost on your question, how you want to access coldboxproxy ?

Check CF8Ajax sample application, may be helpful for understanding of coldboxproxy implementation.

http://localhost/coldboxproxy.cfc?method=abc&param=test…… Like this would make a call and coldbox automatically detects that its a proxy call. Also index.cfm is nothing to do with any request when calling coldboxproxy.cfc


Right…that’s my point. I mention index.cfm only to say that I am not using any rewriting. I am using jQuery to post to coldboxproxy.cfc. It appears as though my post to coldboxproxy is being rewritten by ses. Luis said that remote proxy calls are not handled by ses - which sounds perfect. But, it appears as though my post isn’t being recognized as a proxy request.

I have this code in onRequestStart:

<cfif event.isProxyRequest()>

<cfset event.showdebugpanel(“false”)>

However, when I look at my response in Firebug, I see all of the debugging panel code. ColdBox isn’t recognizing the request as a proxy request. If that is an accurate statement, then it makes sense that SES would try to route it.

I guess the real question here is what am I doing wrong in my jQuery code that is causing it to happen this way?

Here is my page:

On load, I am making a post back to the server to get the data i use to populate the calendar. This is what that looks like:

function displayCalendarData(e){
var serializedForm = $(’##timezoneForm’).formSerialize();
$.post(‘coldboxproxy.cfc?method=process&event=calendar.getCalData’, serializedForm, function(json){
/code to handle json response from server/coldfusion/coldbox/
}, “json”);

When you look at the response in Firebug you see the error:

The event handler: calendar.coldboxproxy.cfc is not valid registered event.

This is happening everywhere I am calling coldboxproxy this way.

Any ideas?

I still have months and months of development to do on the site, so there’s a lot of loose ends. I make no claims (yet) about the site in IE.

Please post your coldboxproxy, I am sure jQuery is passing struct notation params to method “process”

Also you can view your request in browser like this.

As default coldboxproxy is just a starting point, you can customised/adjust according to requirements. Thats why I said have a quick look to CF8Ajax samples.


I checked your js-call: you're calling
http://[myserver]/index.cfm/coldboxproxy.cfc and not


Ahh! That totally put me on the right track.

The post in Firebug did say http://[myserver]/index.cfm/coldboxproxy.cfc (thanks to SES routing), and I missed that before. But, the source said ‘coldboxproxy.cfc?method=process&event=calendar.getCalData’. That was the problem. Once I change my js to use the full url, that fixed it.

I was going to be pissed at myself if I hadn’t worked this out before Monday. Thanks for getting me on the right track Ernst!

And thanks to Sana and Luis as always for the good suggestions and insight!