CanvasIFrameLoginControl fails in windows azure (port 20000)

Dec 9, 2009 at 1:07 AM

Hello gurus,

I have a iframe application hosted in azure.
We are using CanvasIFrameLoginControl in our canvas aspx page.

The following is happening:

Facebook Canvas Callback URL is pointing to http://myapp.cloudapp.net (Default.aspx is opened when root is opened)
Default.aspx has a CanvasIFrameLoginControl with requireLogin = true
It fails when it's called, and shows the following message:

"The Facebook Connect cross-domain receiver URL (http://myapp.cloudapp.net:20000/Default.aspx?fb_sig_in_iframe=1) must have the application’s Connect URL (http://myapp.cloudapp.net/) as a prefix. You can configure the Connect URL in the Application Settings Editor"

When we host the site on a non-azure sever it works fine. It has something to do with the azure 20000 port.

Any ideas?

Thanks!

santiago

May 11, 2010 at 7:54 PM

Hi,

I have the exact same problem. When logging in to Facebook it calls back to http://myapp.cloudapp.com:20000

Did you figure out how to fix this?

Regards,

Ed

May 14, 2010 at 3:26 PM

To address this issue in the 3.1 Beta SDK, in Facebook.Session.CanvasSession.GetNextUrl(), I changed:

return HttpContext.Current.Request.Url.ToString().Replace(props["callback_url"], string.Format("http://apps.facebook.com/{0}/", props["canvas_name"]));

to:

return HttpContext.Current.Request.Url.ToString().Replace(":20000","").Replace(props["callback_url"], string.Format("http://apps.facebook.com/{0}/", props["canvas_name"]));